mrt.frag 395 Bytes
Newer Older
Laszlo Agocs's avatar
Laszlo Agocs committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#version 440

layout(location = 0) in vec3 v_color;

layout(location = 0) out vec4 c0;
layout(location = 1) out vec4 c1;
layout(location = 2) out vec4 c2;
layout(location = 3) out vec4 c3;

layout(std140, binding = 0) uniform buf {
    mat4 mvp;
    float opacity;
} ubuf;

void main()
{
    vec4 c = vec4(v_color * ubuf.opacity, ubuf.opacity);
    c0 = c;
    c1 = c;
    c2 = c;
    c3 = c;
}