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.

41 lines
1.2 KiB

<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="pixelshimmer">
<node name="input_params">
<real name="pixelshimmer">1.0</real>
<real name="pixelshimmer_a">0.1</real>
<real name="pixelshimmer_b">0.05</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[
let
a_rad = pixelshimmer * (pixelshimmer_a + pixelshimmer_b)
a2 = cosh(a_rad)
b2 = sinh(a_rad)
in
pixelshimmer_init_result(pixelshimmer, pixelshimmer_a * a2, pixelshimmer_b * b2)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
x = floor(vec2(hash_shadertoy(a * p_in.x, a * p_in.x, p_in.x * p_in.y), hash_shadertoy(b * p_in.y, b * p_in.y, p_in.x * p_in.y)) * weight)
vx = x + vec2(hash_shadertoy(x.x, p_in.x, p_in.y), hash_shadertoy(x.y, p_in.x, p_in.y))
leng = hash_shadertoy(vx.x, vx.y, vx.x * vx.y)
fade = log(if a < b then unit_rnd_0 + (x.x * p_in.x) else unit_rnd_1 + (x.y * p_in.y)) * leng
in
p_in + vec2(a * p_in.x, b * p_in.y) * leng * fade * weight
]]>
</string>
</transform_def>
</user_transforms>