summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-link-varying-TexCoord.shader_test
blob: 10bfedd92887cac3a6125a285e6799e9dd2a7df0 (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

/* varying gl_TexCoord can be declared to different
   sizes between vertex and fragment shaders.
   See GLSL Spec v1.10, Section 7.6.
*/

[vertex shader]
varying vec4 gl_TexCoord[2];
void main()
{
	gl_TexCoord[0] = vec4(0.0, 1.0, 0.0, 1.0);
	gl_TexCoord[1] = vec4(1.0, 0.0, 0.0, 1.0);
	gl_Position = ftransform();
}

[fragment shader]
varying vec4 gl_TexCoord[1];
void main()
{
	gl_FragColor = gl_TexCoord[0];
}

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