repo.or.cz
/
piglit.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
glsl-1.20: move a bunch of shaders to the glsl-1.20 dir
[piglit.git]
/
tests
/
spec
/
glsl-1.20
/
execution
/
glsl-vs-varying-array.shader_test
blob
26c55d36b14f8ee35430fc34ebf0e73170492b53
1
[require]
2
GLSL >= 1.20
3
4
[vertex shader]
5
varying vec4 values[4];
6
uniform int index;
7
void main()
8
{
9
values[0] = vec4(0.2);
10
values[index] = vec4(0.4);
11
values[2] = vec4(0.6);
12
values[3] = vec4(0.7);
13
gl_Position = gl_Vertex;
14
}
15
16
[fragment shader]
17
varying vec4 values[4];
18
uniform float f0;
19
uniform float f1;
20
void main()
21
{
22
gl_FragColor = (f0 * values[0] +
23
f1 * values[1] +
24
f0 * values[2] +
25
f0 * values[3]);
26
}
27
28
[test]
29
uniform int index 1
30
uniform float f0 0.0
31
uniform float f1 1.0
32
draw rect -1 -1 2 2
33
probe rgba 1 1 0.4 0.4 0.4 0.4