summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-opt-xy-cmp-0.shader_test
blob: 172918c2a527bc3c55419254c4c99cfd585cb9b6 (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
/* Test (x+y cmp 0) optimization. */

[require]
GLSL >= 1.10

[vertex shader passthrough]

[fragment shader]

uniform float a;

void main()
{
	if ((a - 1.0) >= 0.0)
	    gl_FragColor = vec4(0, 1, 0, 1);
	else
	    gl_FragColor = vec4(1, 0, 0, 1);
}

[test]
uniform float a 0
draw rect -1 -1 1 2
uniform float a 2
draw rect 0 -1 1 2
probe rgb 125 0 0.0 1.0 0.0
probe rgb 0 0 1.0 0.0 0.0