title: Opengl es glsl bitwise operations equivalents
body: <p>I am trying to convert some opengl glsl to opengl es (2.0) glsl. I am passing a byte value into the fragment shader by casting it to a float in my code and then casting it back in the shader. I then need to split the result into two values between 0-15. For opengl glsl I am using</p>
  
  <pre><code>int x = int(a_otherdata);
  int a = (x &gt;&gt; 4) &amp; 0xF;
  int b = x &amp; 0xF;
  </code></pre>
  
  <p>However, I since opengl es does not support bitwise operations I tried doing the following, but it doesn't work.</p>
  
  <pre><code>int x = int(a_otherdata);
  int a = x / 16;
  int b = x - (a * 16);
  </code></pre>