summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-fs-functions-5.shader_test
blob: 78f9fca382edcc2c931912db49549e40e08359a1 (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
[require]
GL >= 2.0
GLSL >= 1.10

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

[fragment shader]
float val = 0.0;
void sub() {
	for (int i = 0; i < 3; ++i) {
		if (i == 1)
			return;
		val = 0.5;
	}
	val = 1.0;
}

void main() {
	sub();
	gl_FragColor = vec4(val);
}

[test]
draw rect -1 -1 2 2
probe all rgb 0.5 0.5 0.5 0.5