Page 1 of 1

testing FRAMEINDEX result not as expected

Posted: Thu May 29, 2025 06:10
by dtristram
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.

Re: testing FRAMEINDEX result not as expected

Posted: Thu May 29, 2025 06:13
by dtristram
I think what is happening is I am rerunning my shader in the same Wire session, and FRAMEINDEX is just starting off at some big number.