summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-fs-normalmatrix.shader_test
blob: 50dd8c8d60b2c136fedf33dcd42d7973640d28b2 (plain)
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
[require]
GLSL >= 1.10

[vertex shader]
void main()
{
	gl_Position = gl_Vertex;
}

[fragment shader]
uniform int i;
void main()
{
	gl_FragColor = vec4(gl_NormalMatrix[i], 0.0);
}

[test]
clear color 0.5 0.5 0.5 0.5
clear

uniform int i 0
draw rect -1 -1 0.5 2

uniform int i 1
draw rect -0.5 -1 0.5 2

uniform int i 2
draw rect 0 -1 0.5 2

relative probe rgba (0.125, 0.5) (1.0, 0.0, 0.0, 0.0)
relative probe rgba (0.375, 0.5) (0.0, 1.0, 0.0, 0.0)
relative probe rgba (0.625, 0.5) (0.0, 0.0, 1.0, 0.0)