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.
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.
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:
the cloud and ocean still not shown, what am I doing wrong?