Respect zone visibility property.

This commit is contained in:
howard-stearns 2016-03-11 10:19:44 -08:00
parent 8a36df13df
commit 9cdd0ac6d0

View file

@ -364,8 +364,9 @@ void EntityTreeRenderer::applyZonePropertiesToScene(std::shared_ptr<ZoneEntityIt
_pendingSkyboxTexture = true;
}
}
skyStage->setBackgroundMode(model::SunSkyStage::SKY_BOX);
// Visibility does not effect other side effects such as ambient light or the selection of "best" zone.
// The skyStage backgroundMode is the hammer used (e.g., in Application.cpp) to control the visiblity of the sky box.
skyStage->setBackgroundMode(zone->getVisible() ? model::SunSkyStage::SKY_BOX : model::SunSkyStage::SKY_DOME);
break;
}