summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-varying-read.shader_test
blob: 368bb389a603cee6b3bab1ba01c8bc2422504c01 (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
[require]
GLSL >= 1.10

[vertex shader]
varying vec2 var1;
varying vec2 var2;
void main()
{
    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
    var1.x = 1.0;
    var1.y = 0.0;
    var2 = var1;
}

[fragment shader]
varying vec2 var1;
varying vec2 var2;
void main()
{
	gl_FragColor = vec4(0.0, var2, 1.0);
}

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