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

[require]
GLSL >= 1.10

[vertex shader passthrough]

[fragment shader]

uniform float a;

void main()
{
	if (0.0 >= (a - 1.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 1.0 0.0 0.0
probe rgb 0 0 0.0 1.0 0.0