In a GLSL fragment shader I am trying to cast a float into an int. The compiler raises an error:
ERROR: 0:60: '=' : cannot convert from 'mediump float' to 'highp int' I tried raising the precision of the int:
mediump float indexf = floor(2.0 * mixer); highp int index = indexf; but to no avail.
How do I cast the int properly?
floatBitsToInt. \$\endgroup\$