summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-fs-loop-lt.shader_test
blob: 2a8b94b5d3d9025fadf0d15a7c2448030c6df85a (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]
GLSL >= 1.10

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

[fragment shader]
void main()
{
	float sum;
	vec3 c = vec3(0.0);
	for(sum = 0.0; sum < 4.5; sum += 1.0){
		c.x += 0.1;
	}
	for(sum = 0.0; sum < 5.0; sum += 1.0){
		c.y += 0.1;
	}
	for(sum = 0.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.5 0.5 0.6