[osg-users] Problem setting a skydome

David Spilling david.spilling at gmail.com
Sun Jul 13 12:22:33 PDT 2008


Firstly, you need to prevent the CullVisitor from considering your skydome
in it's autonear/far calculation. You can do this with

You will also need to "mimic" being a long way away via, most simply by
drawing first (e.g. via a pre draw camera, or good control of your render
bins) with depth checking/writing disabled.

If you have expensive shaders on your skydome, you might want to draw last
to z depth = 1 (via stateset->setAttributeAndModes(new
osg::Depth(osg::Depth::ALWAYS, 1.0,1.0))). NB - you might need LEQUAL,
depending on how you cleared your zbuffer. Depending on what you are dong,
you might still also run into a problem in which your skydome is clipped, so
you'll need to control the projective camera; look at the DepthPartition
example if you need a way forward.

Hope that helps,

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

More information about the osg-users mailing list