 
       vec4 newPos = inPos + lambda * edge;
       cutPositions[cutPositionCount++] = newPos;
-      vec4 c = vec4(plane.xyz * 0.5 + vec3(0.5, 0.5, 0.5), 0.5f);
       //vec4 c = newPos * 0.5f + vec4(0.5, 0.5f, 0.5f, 0);
       // c.a = 0.5f;
       emittedVertexCount = emit(matrix * newPos, c, emittedVertexCount);  // vec4(1, 1, 0, 1));

  float magnitude = sqrt(dot(plane.xyz, plane.xyz));
  plane = plane / magnitude;

  for (int i = 0; i < 3; ++i)
  {
    vec4 inPos = triangle[i];
    bool isPosInFOV = dot(inPos, plane) > cutOffZ;
    if (isPosInFOV)
    {
      vec4 c = inPos * 0.5f + vec4(0.5, 0.5f, 0.5f, 0);
      c.a = 0.5f;
      c.rgb = plane.xyz * 0.5 + vec3(0.5, 0.5, 0.5);
      emittedVertexCount = emit(matrix * inPos, c, emittedVertexCount);  // vColor[0]);
    }
    vec4 nextPos = triangle[(i + 1) % 3];


  if (emittedVertexCount == 5)
  {
    emit(firstPosition, c, emittedVertexCount);
  }

