title: GLSL (ES 3.0): reference a uniform using another uniform's location and an offset
body: <p>In GLSL for OpenGL ES 3.0, if I have the following code:</p>
  
  <pre><code>uniform mat4 matrix1;
  uniform mat4 matrix2;
  uniform mat4 matrix3;
  </code></pre>
  
  <p>is it possible to reference matrix2 or matrix3, using only the location of matrix1 plus an offset? This has to be dynamic i.e. the index will be an attribute.</p>
  
  <p>EDIT: I mean using matrix2 and matrix3 in the shader itself with only the location of matrix1 and an offset, not getting the location of them on the CPU.</p>
  
  <p>EDIT 2: In case it helps I'll add more context. I'm trying to solve <a href="https://stackoverflow.com/questions/20388086/opengl-es-3-0-matrix-array-only-using-first-matrix">this</a> GPU-skinning issue, and it's come to my attention that Adreno doesn't support indexing uniform arrays with anything other than constant integers in their vertex shaders (contrary to what the OpenGL ES 3.0 GLSL spec mandates). I'm thinking of storing the array of matrices individually one after the other now, however still need to be able to access them with an index provided as an attribute.</p>