From 372c52fea55b01469c8c99a8fa50384a87f71f3e Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Tue, 30 Aug 2016 14:43:37 -0700 Subject: [PATCH 1/2] restore default ambient skybox --- interface/src/Application.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 7b0c2a31c1..35c2ac1dd8 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4348,8 +4348,7 @@ namespace render { auto scene = DependencyManager::get()->getStage(); auto sceneKeyLight = scene->getKeyLight(); auto defaultSkyboxAmbientTexture = qApp->getDefaultSkyboxAmbientTexture(); - // set the ambient sphere uniformly - the defaultSkyboxAmbientTexture has peaks that cause flashing when turning - sceneKeyLight->setAmbientSphere(DependencyManager::get()->getWhiteTexture()->getIrradiance()); + sceneKeyLight->setAmbientSphere(defaultSkyboxAmbientTexture->getIrradiance()); sceneKeyLight->setAmbientMap(defaultSkyboxAmbientTexture); // fall through: render defaults skybox } else { From 441005bba02aaa2195b8e9a32e58e08329f0ea5b Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Wed, 31 Aug 2016 09:47:53 -0700 Subject: [PATCH 2/2] 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) }