1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
[require]
GLSL >= 1.40
[vertex shader]
#version 140
struct S {
float r;
float g;
float b;
float a;
};
uniform ubo1 {
S s;
};
in vec4 piglit_vertex;
out vec4 v;
void main()
{
gl_Position = piglit_vertex;
v = vec4(s.r, s.g, s.b, s.a);
}
[fragment shader]
#version 140
in vec4 v;
void main()
{
gl_FragColor = v;
}
[test]
uniform float s.r 0.0
uniform float s.g 1.0
uniform float s.b 0.0
uniform float s.a 0.0
draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0
|