14 lines
263 B
GLSL
14 lines
263 B
GLSL
#version 300 es
|
|
precision highp float;
|
|
|
|
in vec2 vTexCoord;
|
|
out vec4 fragColor;
|
|
|
|
uniform sampler2DArray uTexArray;
|
|
uniform int uLayer;
|
|
|
|
void main() {
|
|
float value = texture(uTexArray, vec3(vTexCoord, float(uLayer))).r;
|
|
fragColor = vec4(vec3(value), 1.0);
|
|
}
|