1
0
Fork 0
fgdata/Shaders/road.geom

31 lines
697 B
Text
Raw Normal View History

2011-09-23 21:25:15 +00:00
#version 120
#extension GL_EXT_geometry_shader4 : enable
varying in vec4 ecPositionIn[];
varying in vec3 ecNormalIn[];
varying out vec4 ecPosition;
varying out vec3 ecNormal;
void main() {
gl_Position = gl_PositionIn[0];
gl_TexCoord[0] = gl_TexCoordIn[0][0];
ecPosition = ecPositionIn[0];
ecNormal = ecNormalIn[0];
EmitVertex();
gl_Position = gl_PositionIn[1];
gl_TexCoord[0] = gl_TexCoordIn[1][0];
ecPosition = ecPositionIn[1];
ecNormal = ecNormalIn[1];
EmitVertex();
gl_Position = gl_PositionIn[2];
gl_TexCoord[0] = gl_TexCoordIn[2][0];
ecPosition = ecPositionIn[2];
ecNormal = ecNormalIn[2];
EmitVertex();
EndPrimitive();
}