testing FRAMEINDEX result not as expected

Post your questions here and we'll all try to help.
Post Reply
dtristram
Posts: 9
Joined: Fri Dec 31, 2021 19:32

testing FRAMEINDEX result not as expected

Post 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.

dtristram
Posts: 9
Joined: Fri Dec 31, 2021 19:32

Re: testing FRAMEINDEX result not as expected

Post 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.

Post Reply