In a GLSL fragment shader I am trying to cast a float into an int. The compiler has other ideas. It complains thusly:
ERROR: 0:60: '=' : cannot convert from 'mediump float' to 'highp int'
I am trying to do this:
mediump float indexf = floor(2.0 * mixer);
highp int index = indexf;
I (vainly) tried to raise the precision of the int above the float to appease the GL Gods but no joy.
Could someone please school me here?
Thanks,
Doug