Debian Codegraph @

tests/manual/rhi/mrt/mrt.frag

raw
1 #version 440
2
3 layout(location = 0) in vec3 v_color;
4
5 layout(location = 0) out vec4 c0;
6 layout(location = 1) out vec4 c1;
7 layout(location = 2) out vec4 c2;
8 layout(location = 3) out vec4 c3;
9
10 layout(std140, binding = 0) uniform buf {
11 mat4 mvp;
12 float opacity;
13 } ubuf;
14
15 void main()
16 {
17 vec4 c = vec4(v_color * ubuf.opacity, ubuf.opacity);
18 c0 = vec4(c.r, 0, 0, c.a);
19 c1 = vec4(0, c.g, 0, c.a);
20 c2 = vec4(0, 0, c.b, c.a);
21 c3 = c;
22 }