ocean layer question

classic Classic list List threaded Threaded
2 messages Options
jeladi jeladi
Reply | Threaded
Open this post in threaded view
|

ocean layer question

I think I am having some issues with z-fighting when I enable the ocean layer in my earth file and use the AutoClipPlaneCullCallback in my application.  I am following the example in the ocean.earth file and using the default values for the min/max near/far ratios in the callback.  

I do not see this issue when I run with any osgearth examples that also use the AutoClipPlaneCullCallback (e.g. osgearth_terrainprofile) with my earth file.  

If I make the min/max near/far ratio values larger the ocean z-fighting problem goes away but then some of the objects I place around the globe (particularly those that are very high) start disappearing if I get close to them.  Changing my depth buffer from 24 to 32 bits doesn't help.  Any thoughts?

ocean z-fighting
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: ocean layer question

Have you tried using the logarithmic depth buffer?
osgEarth::LogarithmicDepthBuffer

The osgEarth examples all use it by default. Maybe that's the difference.
Glenn Waldron / Pelican Mapping