     EndPrimitive();
     if (hasTwoTriangles)
     {
-      justEmit(pos, color);
+      justEmit(matrix, pos);
       ++emittedVertexCount;
     }
   }

{
  if (cutPositionCount == 3)
  {
    justEmit(matrix * cutPositions[0], vec4(1, 0, 0, 0.8));
    justEmit(matrix * cutPositions[1], vec4(1, 0, 0, 0.8));
    justEmit(matrix * cutPositions[2], vec4(1, 0, 0, 0.8));
    return;
  }


      addCutPositionIfNew(newPos);
      //vec4 c = newPos * 0.5f + vec4(0.5, 0.5f, 0.5f, 0);
      // c.a = 0.5f;
      emittedVertexCount = emit(matrix, newPos, emittedVertexCount);
    }
  }

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

  EndPrimitive();
