Debian Codegraph @

tests/manual/rhi/multiview/texture.frag

raw
1 #version 440
2
3 layout(location = 0) in vec2 v_texcoord;
4
5 layout(location = 0) out vec4 fragColor;
6
7 layout(binding = 1) uniform sampler2DArray tex;
8
9 layout(std140, binding = 0) uniform buf {
10 mat4 mvp;
11 int flip;
12 float layer;
13 };
14
15 void main()
16 {
17 vec4 c = texture(tex, vec3(v_texcoord, layer));
18 fragColor = vec4(c.rgb * c.a, c.a);
19 }