summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-fs-loop-break.shader_test
blob: c30a5ec6fa64a02408252e9ac428cbe9c9f0ac30 (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]

[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)