Last change
on this file since 12206 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 | |
---|
3 | uniform vec4 origColour; |
---|
4 | uniform vec4 cloneColour; |
---|
5 | |
---|
6 | out vec4 colour; |
---|
7 | |
---|
8 | layout(triangles) in; |
---|
9 | layout(line_strip, max_vertices = 6) out; |
---|
10 | |
---|
11 | void 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.