Epsilon fix for warp dilation node

This commit is contained in:
Rodz Labs 2024-07-22 22:27:30 +02:00
parent 3053341bab
commit 67a674e0d3
1 changed files with 4 additions and 1 deletions

View File

@ -46,7 +46,10 @@
"\tfloat v = 0.0;",
"\tfor (float x = 0.0; x <= $d; x += e) {",
"\t\tv = max(v, $in(fract(uv))*(1.0-x/$d*$a));",
"\t\tvec2 delta = $(name)_slope(uv, 0.0001);",
"\t\tvec2 delta = $(name)_slope(uv, e);",
"\t\tif (delta.x == 0.0 && delta.y == 0.0) {",
"\t\t\tbreak;",
"\t\t}",
"\t\tuv += e*normalize(delta);",
"\t}",
"\treturn v;",