1
0
Fork 0

Use black clear color only at high altitudes.

Black clear color can cause visual glitches on low
altitudes, but a black space is much nicer, so just
switch at 300.000 ft.
This commit is contained in:
Thomas Geymayer 2014-09-18 00:16:09 +02:00
parent 015ecb54f3
commit 104dc1170b

View file

@ -1615,7 +1615,14 @@ FGRenderer::update( ) {
current__view->set_dirty();
osg::Camera *camera = viewer->getCamera();
camera->setClearColor(osg::Vec4(0, 0, 0, 0));
osg::Vec4 clear_color = _altitude_ft->getDoubleValue() < 300000
? toOsg(l->adj_fog_color())
// skydome ends at ~328000 ft and would produce a
// strange looking grey space -> black looks much
// better :-)
: osg::Vec4(0, 0, 0, 1);
camera->setClearColor(clear_color);
updateSky();