terrain-frag.glsl 315 B

1234567891011121314151617181920212223
  1. #version 300 es
  2. precision mediump float;
  3. precision lowp sampler2DArray;
  4. in vec2 tex_vs;
  5. flat in float tex_index_vs;
  6. out vec4 outColor;
  7. uniform sampler2DArray sTex;
  8. void main() {
  9. vec4 d = texture(sTex, vec3(tex_vs, tex_index_vs));
  10. outColor = vec4(d.rgb, 1);
  11. // outColor = vec4(tex_vs.xy,1.0, 1);
  12. }