Don't override global clear color in the Lighting stage. Should fix ugly 'circle' appearing due to sky sphere being clipped when above 32000 ft.
Fix suggested by Emilian H.
buildAttachments(info, camera, stage->name, stage->attachments);
camera->setDrawBuffer(GL_FRONT);
camera->setReadBuffer(GL_FRONT);
- camera->setClearColor( osg::Vec4( 0.5, 0.5, 0.5, 1. ) );
camera->setClearMask( GL_COLOR_BUFFER_BIT );
osg::StateSet* ss = camera->getOrCreateStateSet();
ss->setAttribute( new osg::Depth(osg::Depth::LESS, 0.0, 1.0, false) );