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.

36 lines
834 B

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="oneHandedES">
<node name="input_params">
<real name="oneHandedES">1</real>
</node>
<node name="internal_params">
<real name="weight" />
</node>
<int name="num_unit_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
oneHandedES_init_result(oneHandedES)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
z = complex(p_in.x, p_in.y)
result = (weight * twoinvpi()) * log(z + sqrt(z * z + 1.0))
as_out = vec2(result.im, result.re)
x_off = if p_in.x >= 0 then 1.0 else -1.0
sp_out = p_in + vec2(x_off, 0.0) * weight
in
lerp(as_out, sp_out, if unit_rnd_0 >= 0.5
then 1.0
else 0.0)
]]>
</string>
</transform_def>
</user_transforms>