Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
sp332
· 9y ago · 0 comments
I couldn't even find an integer modulus operation when I was porting my fractal code to WebGL.
https://www.shadertoy.com/view/MdSXWc
Comments
[–]
TrinaryWorksToo
9y ago
Did the % operator not work? I just tested 1 % 10 and it seemed to compile. I used the % operator in other shaders. Remember that WebGL is ultimately a sub and superset of C.
[–]
sp332
OP
9y ago
It does work! I wonder why I didn't think of it while transliterating from my older Python codebase.
[–]
FreeFull
9y ago
It's possible it used to not work with an older version of WebGL/GLSL, and now it does.