From 441005bba02aaa2195b8e9a32e58e08329f0ea5b Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Wed, 31 Aug 2016 09:47:53 -0700 Subject: [PATCH] use existing defaults for zoneless keylight --- interface/src/Application.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 35c2ac1dd8..9c44876e6e 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4318,18 +4318,14 @@ namespace render { switch (backgroundMode) { case model::SunSkyStage::SKY_DEFAULT: { - static const glm::vec3 DEFAULT_SKYBOX_COLOR{ 255.0f / 255.0f, 220.0f / 255.0f, 194.0f / 255.0f }; - static const float DEFAULT_SKYBOX_INTENSITY{ 0.2f }; - static const float DEFAULT_SKYBOX_AMBIENT_INTENSITY{ 2.0f }; - static const glm::vec3 DEFAULT_SKYBOX_DIRECTION{ 0.0f, 0.0f, -1.0f }; - auto scene = DependencyManager::get()->getStage(); auto sceneKeyLight = scene->getKeyLight(); + scene->setSunModelEnable(false); - sceneKeyLight->setColor(DEFAULT_SKYBOX_COLOR); - sceneKeyLight->setIntensity(DEFAULT_SKYBOX_INTENSITY); - sceneKeyLight->setAmbientIntensity(DEFAULT_SKYBOX_AMBIENT_INTENSITY); - sceneKeyLight->setDirection(DEFAULT_SKYBOX_DIRECTION); + sceneKeyLight->setColor(ColorUtils::toVec3(KeyLightPropertyGroup::DEFAULT_KEYLIGHT_COLOR)); + sceneKeyLight->setIntensity(KeyLightPropertyGroup::DEFAULT_KEYLIGHT_INTENSITY); + sceneKeyLight->setAmbientIntensity(KeyLightPropertyGroup::DEFAULT_KEYLIGHT_AMBIENT_INTENSITY); + sceneKeyLight->setDirection(KeyLightPropertyGroup::DEFAULT_KEYLIGHT_DIRECTION); // fall through: render a skybox (if available), or the defaults (if requested) }