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.

72 lines
1.5 KiB

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="split_mirror_x">
<node name="input_params">
<real name="split_mirror_x">1</real>
<real name="control">1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="ctrl1" />
</node>
<int name="num_unit_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
split_mirror_x_init_result(split_mirror_x, control)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
r2 = (vec2(sinh(p_in.x), tanh(p_in.x)).x * vec2(sinh(p_in.x), tanh(p_in.x))).y * ctrl1
in
if r2 > 1
then
if unit_rnd_0 < 0.5
then p_in * (weight / r2)
else p_in * weight
else vec2(0.0, 0.0)
]]>
</string>
</transform_def>
<transform_def name="split_mirror_y">
<node name="input_params">
<real name="split_mirror_y">1</real>
<real name="control">1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="ctrl1" />
</node>
<int name="num_unit_randoms">1</int>
<string name="winter_init_function">
<![CDATA[
split_mirror_y_init_result(split_mirror_y, control)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
r2 = (vec2(sinh(p_in.y), tanh(p_in.y)).x * vec2(sinh(p_in.y), tanh(p_in.y))).y * ctrl1
in
if r2 > 1
then
if unit_rnd_0 < 0.5
then p_in * (weight / r2)
else p_in * weight
else vec2(0.0, 0.0)
]]>
</string>
</transform_def>
</user_transforms>