Debian Codegraph @

tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag

raw
1 #version 440
2
3 layout(location = 0) in vec2 uv;
4 layout(location = 0) out vec4 fragColor;
5
6 layout(binding = 0) uniform sampler2D tex[3];
7
8 void main()
9 {
10 vec4 c0 = texture(tex[0], uv);
11 vec4 c1 = texture(tex[1], uv);
12 vec4 c2 = texture(tex[2], uv);
13 vec4 cc = c0 + c1 + c2;
14 vec4 c = vec4(clamp(cc.r, 0.0, 1.0), clamp(cc.g, 0.0, 1.0), clamp(cc.b, 0.0, 1.0), clamp(cc.a, 0.0, 1.0));
15 c.rgb *= c.a;
16 fragColor = c;
17 }