Skip to content

--nologdepth leads to culling of near features #2374

Answered by gwaldron
rebmaso asked this question in Support Q&A
Discussion options

You must be logged in to vote

I think you misunderstood. I was merely suggesting using --nologdepth to test the LDB theory, not to solve your problem.

If you disable the LDB, you do need to either
(a) Use DO_NOT_COMPUTE_NEAR_FAR and set the clip planes manually; or
(b) Use osg::Camera::setNearFarRatio to pull the near plane closer to the camera. (This is why your attempt to set the near plane failed - it is auto-calculated by multiplying the far plane by this ratio.)

Otherwise, you will need to reverse-engineer the LDB projection matrix. The shader that applies it is here:
https://github.com/gwaldron/osgearth/blob/master/src/osgEarth/LogDepthBuffer.VertOnly.glsl

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rebmaso
Comment options

Answer selected by rebmaso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants