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:
parent
015ecb54f3
commit
104dc1170b
1 changed files with 8 additions and 1 deletions
|
@ -1615,7 +1615,14 @@ FGRenderer::update( ) {
|
||||||
current__view->set_dirty();
|
current__view->set_dirty();
|
||||||
|
|
||||||
osg::Camera *camera = viewer->getCamera();
|
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();
|
updateSky();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue