layertexturequad.frag 150 B

12345678910
  1. uniform sampler2DArray tex;
  2. uniform int layer;
  3. in vec2 uv;
  4. out vec4 FragColor;
  5. void main()
  6. {
  7. FragColor = texture(tex, vec3(uv, float(layer)));
  8. }