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

[vertex shader file]
glsl-mvp.vert

[fragment shader]
void main()
{
	float sum;
	vec3 c = vec3(0.0);
	for(sum = 10.0; sum > 4.5; sum -= 1.0){
		c.x += 0.1;
	}
	for(sum = 10.0; sum > 5.0; sum -= 1.0){
		c.y += 0.1;
	}
	for(sum = 10.0; sum > 5.5; sum -= 1.0){
		c.z += 0.1;
	}
	gl_FragColor = vec4(c, 1.0);
}

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