title: GLSL indexing into uniform array with variable length
body: <p>I am passing an uniform array to geometry shader and want to index into it using a variable. I can use variable length array &amp; index with fixed number (numeric constant) OR I can define a fixed length array &amp; index using varible. However I can't index into variable length array using a variable. </p>
  
  <p>Below is pseudo code for geometry shader with cases that work &amp; case that doesn't work</p>
  
  <p>This works:</p>
  
  <pre><code>    uniform vec2 dimensions[2];
      // some code which computes index which is an int
      float dimX = dimensions[index].x;
  </code></pre>
  
  <p>This works:</p>
  
  <pre><code>    uniform vec2 dimensions[];
      // some code which computes index which is an int
      float dimX = dimensions[0].x;
  </code></pre>
  
  <p>This doesn't work:</p>
  
  <pre><code>    uniform vec2 dimensions[];
      // some code which computes index which is an int
      float dimX = dimensions[index].x; 
  </code></pre>
  
  <p>Is it possible to do something like this?</p>