     gl_ClipVertex = gl_ClipVertexIn[0];
     gl_Position = newPositionIn[0];
     EmitVertex(); 
+    gl_FrontColor = volumeColor[2];
     gl_ClipVertex = gl_ClipVertexIn[2];
     gl_Position = newPositionIn[2];
     EmitVertex(); 
+    gl_FrontColor = volumeColor[3];
     gl_ClipVertex = gl_ClipVertexIn[3];
     gl_Position = newPositionIn[3];
     EmitVertex(); 

    d1 = gl_PositionIn[2] - gl_PositionIn[1];
    d2 = gl_PositionIn[3] - gl_PositionIn[1];
    triangleNormal = cross(d1.xyz,d2.xyz);
    gl_FrontColor =volumeColor[3];;
    gl_ClipVertex = gl_ClipVertexIn[1];
    gl_Position = newPositionIn[1]; 
    EmitVertex(); 
    gl_ClipVertex = gl_ClipVertexIn[2];
    gl_Position = newPositionIn[2];
    EmitVertex(); 
    gl_ClipVertex = gl_ClipVertexIn[3];
    gl_Position = newPositionIn[3];
    EmitVertex(); 

    d1 = gl_PositionIn[1] - gl_PositionIn[0];
    d2 = gl_PositionIn[3] - gl_PositionIn[0];
    triangleNormal = cross(d1.xyz,d2.xyz);
    gl_FrontColor =volumeColor[0];
    gl_ClipVertex = gl_ClipVertexIn[0];
    gl_Position = newPositionIn[0]; 
    EmitVertex(); 
    gl_FrontColor = volumeColor[1];
    gl_ClipVertex = gl_ClipVertexIn[1];
    gl_Position = newPositionIn[1];
    EmitVertex(); 
    gl_FrontColor = volumeColor[3];
    gl_ClipVertex = gl_ClipVertexIn[3];
    gl_Position = newPositionIn[3];
    EmitVertex(); 
