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

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

[fragment shader]
void main()
{
	vec2 c = gl_TexCoord[0].xy;

	for (int i = 0; i < 1; ++i) {
		if (c.x + c.y >= 0.0)
			break;
	}

	gl_FragColor = vec4(1,1,1,1);
}

[test]
clear color 0.0 0.0 0.0 0.0
clear
draw rect -1 -1 2 2
probe all rgb 1.0 1.0 1.0 1.0