+/**
+ * \brief Geometry shader which constructs a cube from each given point
+ *
+ * The constructed cube has a size of 1 x 1 x 1 and the center
+ * is the input point. The cube is intersected with the near
+ * plane, so that nothing is behind the near plane. Additional
+ * geometry is generated to fill the created hole.
+ */
+
 #version 440
 
 layout(points) in;

  EndPrimitive();
}

void processSide(const mat4 matrix, const vec4 nearPlane, const vec4 center,
                 const vec4 side, const vec4 varying1, const vec4 varying2)
{

vec4 cutPositions[18];
int cutPositionCount = 0;

/**
 * \brief Emits the vertex position defined by matrix * pos
 *
 * This consists of setting the vertexPos and vertexColor
 * as well as the gl_Position. The color is calculated
 * from the position so that it can be used as texture coordinate.
 */
void emit(const mat4 matrix, const vec4 pos)
{
  vertexPos = matrix * pos;
