summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-const-builtin-tan.shader_test
blob: 0ddc1c3a278f47830c12b2ebcd4c3c15715c4b22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[require]
GLSL >= 1.20

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

[fragment shader]
void main() {
    const float one = tan(0.785398163397448);
    const float sqrt3 = tan(1.0471975511965976);
    const float zero = tan(0.0);

    gl_FragColor = vec4(zero, one, sqrt3 - 1.0, 1.0);
}

[test]
draw rect -1 -1 2 2
probe all rgb 0.0 1.0 0.7320508075688772