Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/GLSL150/SwizzleGP.glsl @ 12115

Last change on this file since 12115 was 12115, checked in by wiesep, 5 years ago

Changed folder structure, deletet some unused files and cleaned up code

File size: 629 bytes
Line 
1#version 150
2
3uniform vec4 origColour;
4uniform vec4 cloneColour;
5
6out vec4 colour;
7
8layout(triangles) in;
9layout(line_strip, max_vertices = 6) out;
10
11void main()
12{
13    // Pass-through!
14    for (int i = 0; i < gl_in.length(); i++){
15        gl_Position = gl_in[i].gl_Position;
16        colour = origColour;
17        EmitVertex();
18    }
19    EndPrimitive();
20
21    // New piece of geometry!  We just swizzle the x and y terms.
22    for (int i = 0; i < gl_in.length(); i++){
23        gl_Position = gl_in[i].gl_Position;
24        gl_Position.xy = gl_Position.yx;
25        colour = cloneColour;
26        EmitVertex();
27    }
28    EndPrimitive();
29}
Note: See TracBrowser for help on using the repository browser.