summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-fs-statevar-call.shader_test
blob: 9d08d052b0b0d258f554b2495d3164e9ff86c4d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[require]
GLSL >= 1.10

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

[fragment shader]
vec4 mix_lighting(gl_LightSourceParameters l)
{
	return l.constantAttenuation / 2.0 + l.ambient.xwxx;
}

void main()
{
	gl_FragColor = mix_lighting(gl_LightSource[0]);
}

[test]
draw rect -1 -1 2 2
probe all rgba 0.5 1.0 0.5 0.5