Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/data_extern/programs/GLSL150/SwizzleGP.glsl @ 12397

Last change on this file since 12397 was 12115, checked in by wiesep, 6 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.