Cull issue when apply vertical scale by terrain shader

classic Classic list List threaded Threaded
3 messages Options
jawbreaker jawbreaker
Reply | Threaded
Open this post in threaded view
|

Cull issue when apply vertical scale by terrain shader

     Hi recently  i find a issue like this : I apply 100 times vertical scale to terrain by  terrain shader,so the ocean area will became sunken effect . when I zoom in  and move close to the bottom of ocean, look straight down at the bottom ,then rotate up slowly to look at the horizon, some tiles are getting black or disappear piece by piece for a moment.
     My application uses setCullingMode(osg::CullSettings::NO_CULLING) to turn off all  of the  CULL mode ,why the  tiles  gett black or disappear  piece by piece   when i move close to the bottom of ocean.
    I used osg 3.6.5 、osgearth 3.1 、qt 5.9.1 and vs2017  
thank a lot

gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Cull issue when apply vertical scale by terrain shader

This happens because the bounding sphere (or box) of the tile doesn't intersect the view frustum. I agree that NO_CULLING should prevent this from happening. That might be a question for the osg-users forum. Or, you could step through in the debugger and see where the issue may be.
Glenn Waldron / Pelican Mapping
jawbreaker jawbreaker
Reply | Threaded
Open this post in threaded view
|

Re: Cull issue when apply vertical scale by terrain shader

thanks a lot !!
Recently i write two test demo, the one  use osgearth 3.1,the other one use   osgearth 2.8,
I found the demo which use osgearth 2.8 dont have the issue when I zoom in  and move close to the bottom of ocean.
osgearth 2.8 used enigne_mp and  osgearth 3.1 used enigne_rex,so I guess the enigne_rex  majorly  cause  this issue .
I don't know what I think is right.