Volumetric Raycasting and Near-Plane Clipping

Just a little note that if you need to prevent near-plane clipping while moving the camera into your volume, there seems to be a simple way to achieve this effect (in OpenGL): simply enable GL_DEPTH_CLAMP while rendering the front and back faces of the bounding volume you are casting from. There may be a better way to do this, but this seems to work and with no noticeable performance loss.

Leave a Reply

Your email address will not be published. Required fields are marked *