summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-fs-loop-break.shader_test
blob: c5766a2da15a470b6b1554ba2a81c0dd9dcf5ea9 (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
[require]
GLSL >= 1.10

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

[fragment shader]
void main()
{
	for (int i = 0; i < 8; i++) {
		if (i > 4) {
			gl_FragColor = vec4(0.0, 1.0, 0.0, 0.0);
			break;
		}
		gl_FragColor = vec4(1.0, 0.0, 0.0, 0.0);
	}
}

[test]
draw rect -1 -1 2 2
relative probe rgb (0.03, 0.25) (0.0, 1.0, 0.0)