 uniform vec4 ambientColor = vec4(1);
 
 vec4
-lighting(vec3 Peye, vec3 Neye)
+lighting(vec4 diffuse, vec3 Peye, vec3 Neye)
 {
     vec4 color = vec4(0);
 

in vec4 gPosition;
in vec3 gNormal;
noperspective in vec4 gEdgeDistance;

out vec4 outColor;



    layout(lines_adjacency) in;

    #define EDGE_VERTS 4

#endif // PRIM_QUAD

#ifdef  PRIM_TRI

    layout(triangles) in;

    #define EDGE_VERTS 3

#endif // PRIM_TRI

    layout(triangle_strip, max_vertices = EDGE_VERTS) out;

    in vec4 vPosition[EDGE_VERTS];
#ifdef VARYING_COLOR
    in vec3 vColor[EDGE_VERTS];
#endif


out vec4 gPosition;
out vec3 gNormal;
noperspective out vec4 gEdgeDistance;
#ifdef VARYING_COLOR
    out vec3 gColor;
#endif

void emit(int index, vec3 normal)
{
