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:
571 bytes
|
Line | |
---|
1 | #version 150 |
---|
2 | |
---|
3 | // Trivial GLSL geometry shader that doubles a mesh. |
---|
4 | |
---|
5 | uniform mat4 WorldViewProj; |
---|
6 | |
---|
7 | layout(triangles) in; |
---|
8 | layout(triangle_strip, max_vertices = 6) out; |
---|
9 | |
---|
10 | void main(void) |
---|
11 | { |
---|
12 | for (int i = 0; i < gl_in.length(); ++i) { |
---|
13 | gl_Position = WorldViewProj * gl_in[i].gl_Position; |
---|
14 | EmitVertex(); |
---|
15 | } |
---|
16 | EndPrimitive(); |
---|
17 | |
---|
18 | for (int i = 0; i < gl_in.length(); ++i) { |
---|
19 | const vec4 world_offset = vec4(50, 50, 50, 0); |
---|
20 | gl_Position = WorldViewProj * (gl_in[i].gl_Position + world_offset); |
---|
21 | EmitVertex(); |
---|
22 | } |
---|
23 | EndPrimitive(); |
---|
24 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.