Silverlining and Triton Display Problem

classic Classic list List threaded Threaded
5 messages Options
Summer Summer
Reply | Threaded
Open this post in threaded view
|

Silverlining and Triton Display Problem

Hi, I'm using OSG 3.6.5 and osgEarth 3.1, but both the Silverlining and Triton displays are not working properly in the two osgEarth examples (osgearth_silverlining.exe and osgearth_triton.exe), the clouds are always shown behind the earth model, the sea surface is only displayed at a certain angle, it may not be displayed after rotating the viewing angle. Silverlining and Triton display fine under OSG 3.4.1 and
 osgEarth 2.8.0. How can I solve this problem in osgEarth 3.1? Thanks!
My Silverlining SDK version is 5.084, Triton SDK version is 4.36.

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

Re: Silverlining and Triton Display Problem

Hello Summer.

This is because of osgEarth's logarithmic depth buffer. In the src/osgEarthTriton/Shaders folder there are some GLSL files. The README explains that these need to go into Triton's "Resources" folder. Once that is done, you can run osgearth_viewer with the --logdepth2 option, and it should work. Similar approach for SilverLining. Hope this helps.
Glenn Waldron / Pelican Mapping
Summer Summer
Reply | Threaded
Open this post in threaded view
|

Re: Silverlining and Triton Display Problem

Hi, Thanks for your reply.

I copied the two glsl files  in "src\osgEarthTriton\Shaders" folder to Triton "Resources" folder and replace the original file, then run "osgearth_viewer --logdepth2 ..\tests\triton.earth", the console displays "GLSL error detected in: user-vert-functions.glsl", and the ocean is no longer shown in any viewing angle.

Similarly, I copied the glsl files in "src\osgEarthSilverlining\shaders" folder to Silverlining "Resources\Shader" and replace the original file, then run "osgearth_viewer --logdepth2 ..\tests\silverlining.earth",  the cloud is not shown.

Then, I add logarithmic depth buffer code to osgearh_triton.cpp and osgearth_silverlining.cpp example:
    osgEarth::Util::LogarithmicDepthBuffer logDepth;
    logDepth.setUseFragDepth(true);
    logDepth.install(viewer.getCamera());
the cloud and ocean still not shown, what am I doing wrong?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: Silverlining and Triton Display Problem

You might need to update to the newest version of Triton. The shaders in 3.1 are (I believe) intended to work with that. Are you getting any additional shader error information you can share?
Glenn Waldron / Pelican Mapping
Summer Summer
Reply | Threaded
Open this post in threaded view
|

Re: Silverlining and Triton Display Problem

This post was updated on .
I set OSG_NOTIFY_LEVEL and OSGEARTH_NOTIFY_LEVEL to DEBUG. Attachment is the output information of the console. How to get the shader error information?

My Silverlining and Triton SDK were both downloaded in November 2020. And my Triton SDK is the latest Triton SDK, the latest Silverlining SDK version is 5.097, my Silverlining version is 5.084.

result.7z