]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/constant_last_argument.glsl
b73f18260c6bce2b08eb77e99470d0391e8889f5
[libs/gl.git] / tests / glsl / constant_last_argument.glsl
1 uniform sampler2D tex;
2 uniform mat4 mvp;
3
4 #pragma MSP stage(vertex)
5 layout(location=0) in vec4 position;
6 layout(location=1) in vec2 texcoord;
7 void main()
8 {
9         gl_Position = mvp*position;
10         passthrough;
11 }
12
13 #pragma MSP stage(fragment)
14 layout(location=0) out vec4 frag_color;
15 void main()
16 {
17         frag_color = textureLod(tex, texcoord, 0.0)*0.8;
18 }
19
20 /* Expected output: vertex
21 uniform mat4 mvp;
22 layout(location=0) in vec4 position;
23 layout(location=1) in vec2 texcoord;
24 out vec2 _vs_out_texcoord;
25 void main()
26 {
27         gl_Position = mvp*position;
28         _vs_out_texcoord = texcoord;
29 }
30 */
31
32 /* Expected output: fragment
33 uniform sampler2D tex;
34 layout(location=0) out vec4 frag_color;
35 in vec2 _vs_out_texcoord;
36 void main()
37 {
38         frag_color = textureLod(tex, _vs_out_texcoord, 0.0)*0.8;
39 }
40 */