summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-fs-unroll-side-effect.shader_test
blob: af9c1b7cf255a95577d2e40b22c8038e59ba111d (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 file]
glsl-mvp.vert

[fragment shader]
int i = 0;

void foo()
{
	gl_FragColor -= vec4(0.1);
	i = 10;
}

void main()
{
	gl_FragColor = vec4(1.0);
	for (i = 0; i < 7; i++) {
		foo();
	}
}

[test]
clear color 0.0 0.0 0.0 0.0
clear
draw rect -1 -1 2 2
probe rgb 15 15 0.9 0.9 0.9