From 4c662b0d60b210a393d4a113c733bcb5eb23603d Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Thu, 4 Aug 2016 10:31:06 -0700 Subject: [PATCH] Add static consts for default skybox values --- interface/src/Application.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 4739fedc26..1a11096a7a 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4264,13 +4264,18 @@ namespace render { } */ + 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 { 3.5f }; + 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(glm::vec3(255.0f / 255.0f, 220.0f / 255.0f, 194.0f / 255.0f) * 0.2f); - sceneKeyLight->setIntensity(0.2f); - sceneKeyLight->setAmbientIntensity(3.5f); - sceneKeyLight->setDirection({ 0.0f, 0.0f, -1.0f }); + sceneKeyLight->setColor(DEFAULT_SKYBOX_COLOR); + sceneKeyLight->setIntensity(DEFAULT_SKYBOX_INTENSITY); + sceneKeyLight->setAmbientIntensity(DEFAULT_SKYBOX_AMBIENT_INTENSITY); + sceneKeyLight->setDirection(DEFAULT_SKYBOX_DIRECTION); auto defaultSkyboxAmbientTexture = qApp->getDefaultSkyboxAmbientTexture(); sceneKeyLight->setAmbientSphere(defaultSkyboxAmbientTexture->getIrradiance());