title: Argument 4 to function 'texelFetchOffset' must be a constant expression
body: <p>Following an example from the GLSL Cookbook, I am using this code:</p>
  
  <pre><code>vec4 Pass2(){
  ivec2 pix = ivec2(gl_FragCoord.xy);
  vec4 sum = texelFetch(texSampler, pix, 0) * weight[0];
  for(int i = 1; i &lt; 5; i++){
      ivec2 posPixOffs = ivec2(0, pixOffset[i]);
      ivec2 negPixOffs = ivec2(0, -pixOffset[i]);
      sum += texelFetchOffset(texSampler, pix, 0, posPixOffs) * weight[i];
      sum += texelFetchOffset(texSampler, pix, 0, negPixOffs) * weight[i];
  }
  return sum;
  }
  </code></pre>
  
  <p>where <code>pixOffset[]</code> is defined as</p>
  
  <pre><code>uniform int pixOffset[5] = int[](0, 1, 2, 3, 4);
  </code></pre>
  
  <p>and <code>weight[]</code> is just a <code>uniform float</code> set from the client side of the application.</p>
  
  <p>The <code>texelFetch</code> function produces the error in the title.
  What qualifies as a contant expression and why is this not considered one?</p>