Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -2493,8 +2493,6 @@ void Application::loadViewFrustum(Camera& camera, ViewFrustum& viewFrustum) { · 2492 unmodified lines | |||
| 2493 | 2493 | ||
| 2494 | glm::vec3 Application::getSunDirection() { | 2494 | glm::vec3 Application::getSunDirection() { |
| 2495 | // Sun direction is in fact just the location of the sun relative to the origin | 2495 | // Sun direction is in fact just the location of the sun relative to the origin |
| 2496 | // return glm::normalize(_environment.getClosestData(_myCamera.getPosition()).getSunLocation(_myCamera.getPosition())); | ||
| 2497 | |||
| 2498 | auto skyStage = DependencyManager::get<SceneScriptingInterface>()->getSkyStage(); | 2496 | auto skyStage = DependencyManager::get<SceneScriptingInterface>()->getSkyStage(); |
| 2499 | return skyStage->getSunLight()->getDirection(); | 2497 | return skyStage->getSunLight()->getDirection(); |
| 2500 | } | 2498 | } |
| @@ -2875,9 +2873,7 @@ void Application::displaySide(Camera& theCamera, bool selfAvatarOnly, RenderArgs · 374 unmodified lines | |||
| 2875 | 2873 | ||
| 2876 | { | 2874 | { |
| 2877 | DependencyManager::get<DeferredLightingEffect>()->setAmbientLightMode(getRenderAmbientLight()); | 2875 | DependencyManager::get<DeferredLightingEffect>()->setAmbientLightMode(getRenderAmbientLight()); |
| 2878 | // DependencyManager::get<DeferredLightingEffect>()->setGlobalLight(-getSunDirection(), GLOBAL_LIGHT_COLOR, GLOBAL_LIGHT_INTENSITY); | ||
| 2879 | auto skyStage = DependencyManager::get<SceneScriptingInterface>()->getSkyStage(); | 2876 | auto skyStage = DependencyManager::get<SceneScriptingInterface>()->getSkyStage(); |
| 2880 | // DependencyManager::get<DeferredLightingEffect>()->setGlobalLight(-getSunDirection(), GLOBAL_LIGHT_COLOR, skyStage->_light->getIntensity()); | ||
| 2881 | DependencyManager::get<DeferredLightingEffect>()->setGlobalLight(skyStage->getSunLight()->getDirection(), skyStage->getSunLight()->getColor(), skyStage->getSunLight()->getIntensity()); | 2877 | DependencyManager::get<DeferredLightingEffect>()->setGlobalLight(skyStage->getSunLight()->getDirection(), skyStage->getSunLight()->getColor(), skyStage->getSunLight()->getIntensity()); |
| 2882 | 2878 | ||
| 2883 | PROFILE_RANGE("DeferredLighting"); | 2879 | PROFILE_RANGE("DeferredLighting"); |