Render sky with depth test off.
Also, don't set BACKGROUND_BIT for cloud layers.
This commit is contained in:
parent
f7e91f1f08
commit
b96c5c9e4b
@ -25,13 +25,16 @@
|
||||
# include <simgear_config.h>
|
||||
#endif
|
||||
|
||||
#include <simgear/math/sg_random.h>
|
||||
#include <simgear/scene/util/RenderConstants.hxx>
|
||||
|
||||
#include "sky.hxx"
|
||||
#include "cloudfield.hxx"
|
||||
#include "newcloud.hxx"
|
||||
|
||||
#include <simgear/math/sg_random.h>
|
||||
#include <simgear/scene/util/RenderConstants.hxx>
|
||||
|
||||
#include <osg/StateSet>
|
||||
#include <osg/Depth>
|
||||
|
||||
// Constructor
|
||||
SGSky::SGSky( void ) {
|
||||
effective_visibility = visibility = 10000.0;
|
||||
@ -50,8 +53,12 @@ SGSky::SGSky( void ) {
|
||||
|
||||
pre_root = new osg::Group;
|
||||
pre_root->setNodeMask(simgear::BACKGROUND_BIT);
|
||||
osg::StateSet* preStateSet = new osg::StateSet;
|
||||
preStateSet->setAttribute(new osg::Depth(osg::Depth::LESS, 0.0, 1.0,
|
||||
false));
|
||||
pre_root->setStateSet(preStateSet);
|
||||
cloud_root = new osg::Group;
|
||||
cloud_root->setNodeMask(simgear::BACKGROUND_BIT | simgear::MODEL_BIT);
|
||||
cloud_root->setNodeMask(simgear::MODEL_BIT);
|
||||
|
||||
pre_selector = new osg::Switch;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user