title: How to perform bit shift without ("<<" || ">>") operator efficiently?
body: <p>I am working on a OpenGL ES 2.0 shader and I have tightly packed data e.g. three 5-bit unsigned integers within a block of two bytes. To unpack this data I obviously need bit-shifting, but this is not supported in OpenGL ES Shading Language (see page 29 <a href="http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf" rel="noreferrer">http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf</a>)</p>
  
  <p>Consequently I perform a number of *2 and /2 operations to emulate bit shifting.</p>
  
  <p>Does anyone know a more efficient/elegant way to do this? Is there a trick I am not aware of?</p>
  
  <p>Thanks!</p>