Adapted Escape the Dawn engine.

This commit is contained in:
2014-04-04 23:14:18 +02:00
parent 6a64de37fb
commit a7985b1686
64 changed files with 3384 additions and 79 deletions
+34
View File
@@ -0,0 +1,34 @@
#version 430
uniform mat4 MVP;
layout(triangles) in;
layout(line_strip, max_vertices = 6) out;
in VertexData {
vec3 Position;
vec3 Normal;
vec2 TextureCoord;
} Input[3];
out VertexData {
vec3 Position;
vec3 Normal;
vec2 TextureCoord;
} Output;
void main()
{
for (int i = 0; i < gl_in.length(); i++)
{
gl_Position = MVP * vec4(Input[i].Position, 1.0);
EmitVertex();
gl_Position = MVP * vec4(Input[i].Position + Input[i].Normal, 1.0);
EmitVertex();
EndPrimitive();
Output.Position = Input[i].Position;
Output.Normal = Input[i].Normal;
Output.TextureCoord = Input[i].TextureCoord;
}
}