title: Cannot sample GL_TEXTURE_2D_ARRAY in the Fragment Shader
body: <p>I have a GL_TEXTURE_2D_ARRAY which I create with empty data then give to the compute shader to calculate some values, this works fine I get the values in the texture that I want.</p>
  
  <p>Now I'm trying to read that data in the fragment shader to produce some output, I pass it in like this:</p>
  
  <pre><code>glActiveTexture(GL_TEXTURE0);
  glUniform1i(glGetUniformLocation(programID, "textureSampler"), 0);
  glBindTexture(GL_TEXTURE_2D_ARRAY, textureID);
  </code></pre>
  
  <p>Then I call glDrawElements to draw a quad. Within the fragment shader itself I have the code:</p>
  
  <pre><code>uniform sampler2DArray textureSampler;
  </code></pre>
  
  <p>Then I perform a test to see if the texture has successfully been passed into the shader:</p>
  
  <pre><code>vec4 test = texture(textureSampler, ivec3(0,0,0));
  
  if (test == vec4(0.0,0.0,0.0,1.0))
  {
      color = vec4(1.0,0.0,0.0,1.0);
  }
  </code></pre>
  
  <p>And I end up with a red quad meaning that the result of the texture lookup is vec4(0.0,0.0,0.0,1.0) which is not what it should be based on the values I write in the compute shader and the testing I do afterwards. I've checked and every single texel is the same so I'm guessing I'm doing something wrong in the passing of the texture can anyone spot what it is?</p>