Browse Source

+ el_em

+ el_em_fill
development
Crystalize 9 months ago
parent
commit
4c8dc37703
  1. 40
      el_em.xml
  2. 38
      el_em_fill.xml

40
el_em.xml

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="el_em">
<!-- Crystalize made this -->
<node name="input_params">
<real name="el_em" >1</real>
<real name="mod" minval="-1.0" maxval="1.0">1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="mod" />
</node>
<int name="num_unit_randoms">2</int>
<string name="winter_init_function">
<![CDATA[
el_em_init_result(el_em, mod)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
r = 1 / length(p_in)
elr = if p_in.x > r
then p_in
else if -p_in.x > r
then p_in
else if p_in.x < r && -p_in.x < r
then p_in * mod
else p_in * r
in
elr * weight
]]>
</string>
</transform_def>
</user_transforms>

38
el_em_fill.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<user_transforms>
<transform_def name="el_em_fill">
<!-- Crystalize made this -->
<node name="input_params">
<real name="el_em_fill" >1</real>
<real name="mod" minval="-0.0" maxval="1.0">1</real>
</node>
<node name="internal_params">
<real name="weight" />
<real name="mod" />
</node>
<int name="num_unit_randoms">2</int>
<string name="winter_init_function">
<![CDATA[
el_em_fill_init_result(el_em_fill, mod / 2.0)
]]>
</string>
<string name="winter_eval_function">
<![CDATA[
let
r = 1 / length(p_in)
elr = if p_in.x < r && p_in.x > r * mod
then p_in
else if -p_in.x < r && -p_in.x > r * mod
then p_in
else p_in * 65536
in
elr * weight
]]>
</string>
</transform_def>
</user_transforms>
Loading…
Cancel
Save