2 #extension GL_EXT_geometry_shader4 : enable
6 vec4 v1 = gl_PositionIn[0];
7 vec4 v2 = gl_PositionIn[1];
8 vec4 v3 = gl_PositionIn[2];
13 gl_Position = gl_ModelViewProjectionMatrix * v1;
14 gl_FrontColor = vec4(0.0, 1.0, 0.0, 0.0);
17 gl_Position = gl_ModelViewProjectionMatrix * v2;
18 gl_FrontColor = vec4(0.0, 1.0, 0.0, 0.0);
21 gl_Position = gl_ModelViewProjectionMatrix * v3;
22 gl_FrontColor = vec4(0.0, 1.0, 0.0, 0.0);
30 vec3 N = cross(l1n.xyz, l2n.xyz);
33 vec4 middle = v1 + 0.333 * l1 + 0.333 * l2;
34 gl_Position = gl_ModelViewProjectionMatrix * middle;
35 gl_FrontColor = gl_TexCoordIn[0][0];
38 gl_FrontColor = gl_TexCoordIn[0][0];
40 gl_ModelViewProjectionMatrix * (middle + 0.1 * vec4(N, 0.0));
43 gl_FrontColor = gl_TexCoordIn[0][0];
45 gl_ModelViewProjectionMatrix * (middle + vec4(0.01,0.01,0.01,0.0));