precision highp int?

Hi ,

I can understand the precision qualifier like “precision mediump float” but what’s the point for assigning “precision mediump int”? Are there any differences between “precision highp int” & “precision mediump int”? I mean for an Interger, the floating point precision does not make any sense. Or does the highp or mediump refers to 64bit or 32 bit integer?



Have a look at section 4.5.2 of the GLSL ES spec.

The minimum ranges that OpenGL ES 2.0 implementations have to support for integers are:
lowp [-255, +255]
mediump [-1023, +1023]
highp [-65535, +65535]

Support for integers is quite limited in GLSL ES, and the ranges are chosen so that mediump and highp ints may be implemented using mediump and highp floats, respectively.