[osg-users] Independent prerender step

David Spilling david.spilling at gmail.com
Tue Oct 2 04:51:32 PDT 2007


I do exactly that, using a camera which does the following:

1) Sets DO_NOT_COMPUTE_NEAR_FAR so that the skydome doesn't influence the
auto-z calculation; otherwise large skydome radii will skew the rest of the
scenes znear/zfar
2) Forces the projection matrix so that the skydome radius is within
whatever the auto-calculated znear and zfar. Without this step, there _will_
be a scene/viewing distance that results in a clipping dome. I do this by
overriding the traverse() call, much like the DepthPartition code.
3) just force z=1 on the skyDome with osg::Depth.

I guess rather than step(3) you could draw as a Camera PRE_RENDER (clearing
depth and colour), and making sure that your main NESTED_RENDER path doesn't
clear the colour buffer.

Hope that helps.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071002/7ebd24a2/attachment-0003.htm>


More information about the osg-users mailing list