almost there for clipping. Maybe i need to reverse the output z value for the z-buffer in the vertex shader??