     EndPrimitive();
     if (triangleSplittingNecessary)
     {
-      justEmit(matrix, pos);
+      emit(matrix, pos);
       ++emittedVertexCount;
     }
   }

vec4 cutPositions[18];
int cutPositionCount = 0;

void justEmit(const mat4 matrix, const vec4 pos)
{
  vertexPos = matrix * pos;
  gl_Position = vertexPos;

  cutPositions[cutPositionCount++] = cutPositions[0];
  for (int i = 0; i < cutPositionCount - 1; ++i)
  {
    emit(matrix, center);
    emit(matrix, cutPositions[i]);
    emit(matrix, cutPositions[i + 1]);
    EndPrimitive();
  }
}
