Bit operations


I was just wondering why there aren’t bit operations like bit-shift in OpenGL 2.0 ES Shading Language? Is there some architectural reason?


This restriction allows implementation of the OpenGL ES 2.0 shader pipeline on hardware which is floating point only.

Okay, but if it is floating point only, how come there are still variable types like int? Or are they just floating point numbers with lower precision?

The range requirements for integers are specified so that they can be implemented as floats. Having integers in the language is still useful for type checking and a few other things.