Debian Codegraph @

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

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