xforms for Chaotica
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
899 B

10 months ago
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="blur_x">
<node name="input_params">
<real name="blur_x">1</real>
<real name="blur_x_a">0.5</real>
<real name="blur_x_b">-1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="a" />
<real name="b" />
</node>
<int name="num_unit_randoms">2</int>
<string name="winter_init_function">
<![CDATA[
blur_x_init_result(blur_x, blur_x_a, blur_x_b)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
t2 = (unit_rnd_0 - 0.5) * (pi() / a)
t3 = (unit_rnd_1) * (pi() / b)
aux = (cos(a * t2) + sin(t3))
x = p_in.x * ((weight / 0.5) * p_in.x)
y = p_in.y * ((weight / 1) * p_in.y)
in
vec2(sin(t2) / aux, cos(a * t2) / aux) * (sin(x) * cos(y)) * weight
]]>
</string>
</transform_def>
</user_transforms>