testing FRAMEINDEX result not as expected
Posted: Thu May 29, 2025 06:10
I'm having a little trouble using FRAMEINDEX in an isf shader.
If I test the value like
if (FRAMEINDEX < 10) { ...
then I do not enter this code unless I test against a huge number like 10000000.
but code like this gives expected result though:
vec4 color = vec4( fract( FRAMEINDEX / 1000 ));
This results in output color animating from black to white repeatedly.
Any idea what I am doing wrong? Anyone else testing the integer value of FRAMEINDEX and having success?
Thanks.
If I test the value like
if (FRAMEINDEX < 10) { ...
then I do not enter this code unless I test against a huge number like 10000000.
but code like this gives expected result though:
vec4 color = vec4( fract( FRAMEINDEX / 1000 ));
This results in output color animating from black to white repeatedly.
Any idea what I am doing wrong? Anyone else testing the integer value of FRAMEINDEX and having success?
Thanks.