title: default uniform (array) values
body: <p>Instead of explicitly setting uniform data for a GL program, I set 'defaults' in a simple test (fragment) shader with:</p>
  
  <pre><code>uniform vec3 face_rgb[] = vec3[]
  (
      vec3(0.0, 0.0, 1.0), vec3(0.0, 1.0, 0.0), vec3(1.0, 0.0, 0.0),
      vec3(1.0, 0.0, 1.0), vec3(0.0, 1.0, 1.0), vec3(1.0, 1.0, 0.0),
      vec3(0.2, 0.2, 0.2), vec3(0.0, 0.0, 0.0)
  );
  </code></pre>
  
  <p>Depending on the fragment's texture coordinates, an index value is formulated to look up an RGB value. (The actual RGB values are immaterial)  </p>
  
  <p>This works perfectly well with OS X (GL 3.2 core profile). In fact, <em>far better</em> than using an index with a <code>const</code> array. My question is - is this valid GLSL syntax, and not an implementation-dependent hack? (I have no 4+ access at the moment, but I assume the answer still applies). Also, any ideas as to why a uniform might outperform a constant array?</p>