Skip to content

Commit

Permalink
Remove modulo from randomfloat graph (#1407)
Browse files Browse the repository at this point in the history
It did not achieve its intention of allowing for more consistent behavior over large ranges, giving no benefit over that of a simple scale.

The scale value of 4096 has been chosen arbitrarily.  Perhaps we could expose it as an input someday.
  • Loading branch information
BrianSharpe authored Jul 13, 2023
1 parent 3e838e2 commit 4a55b91
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libraries/stdlib/stdlib_ng.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -1246,13 +1246,9 @@
<convert name="N_convertSeed1" type="float">
<input name="in" type="integer" interfacename="seed" />
</convert>
<modulo name="N_moduloInput" type="float">
<input name="in1" type="float" interfacename="in" />
<input name="in2" type="float" value="4219" />
</modulo>
<multiply name="N_scaleInput" type="float">
<input name="in1" type="float" nodename="N_moduloInput" />
<input name="in2" type="float" value="3947" />
<input name="in1" type="float" interfacename="in" />
<input name="in2" type="float" value="4096" />
</multiply>
<combine2 name="N_combine2" type="vector2">
<input name="in1" type="float" nodename="N_scaleInput" />
Expand Down

0 comments on commit 4a55b91

Please sign in to comment.