]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/redundant_geometry_gl_position.glsl
Normalize vertex normal and tangent vectors in vertex shader
[libs/gl.git] / tests / glsl / redundant_geometry_gl_position.glsl
1 #pragma MSP stage(vertex)
2 layout(location=0) in vec4 position;
3 void main()
4 {
5         gl_Position = position;
6         gl_Position = position;
7 }
8
9 #pragma MSP stage(geometry)
10 layout(triangles) in;
11 layout(triangle_strip, max_vertices=3) out;
12 void main()
13 {
14         for(int i=0; i<3; ++i)
15         {
16                 passthrough[i];
17                 gl_Position = gl_in[i].gl_Position;
18                 EmitVertex();
19         }
20 }
21
22 /* Expected output: vertex
23 layout(location=0) in vec4 position;
24 void main()
25 {
26         gl_Position = position;
27 }
28 */
29
30 /* Expected output: geometry
31 layout(triangles) in;
32 layout(triangle_strip, max_vertices=3) out;
33 void main()
34 {
35         for(int i = 0; i<3; ++i)
36         {
37                 gl_Position = gl_in[i].gl_Position;
38                 EmitVertex();
39         }
40 }
41 */