summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-derivs-varyings.shader_test
blob: 31b974155ade859309d1920c9b2161fb694b0df2 (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
[require]
GLSL >= 1.10

[vertex shader]
varying float xval;
varying float yval;
void main()
{
	gl_Position = gl_Vertex;
	xval = gl_Vertex.x;
	yval = gl_Vertex.y;
}

[fragment shader]
uniform vec4 arg0;
varying float xval;
varying float yval;
void main()
{
	gl_FragColor = vec4(dFdx(xval) * 20.0,
                            dFdy(yval) * 10.0,
                            0.0, 1.0);
}

[test]
draw rect -1 -1 2 2
probe rgba  16  16 0.16 0.08 0.00 1.00