From 7ea790aa4fd06237fa0ce09785328dfb2b7f7aa4 Mon Sep 17 00:00:00 2001 From: samcake Date: Tue, 11 Oct 2016 14:43:41 -0700 Subject: [PATCH] adding a comment to explain what we are doing --- libraries/render-utils/src/DeferredLightingEffect.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index 574f67eed3..2e169e5cc3 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -478,6 +478,8 @@ void RenderDeferredSetup::run(const render::SceneContextPointer& sceneContext, c // Setup the global directional pass pipeline { if (deferredLightingEffect->_shadowMapEnabled) { + // If the keylight has an ambient Map then use the Skybox version of the pass + // otherwise use the ambient sphere version if (keyLight->getAmbientMap()) { program = deferredLightingEffect->_directionalSkyboxLightShadow; locations = deferredLightingEffect->_directionalSkyboxLightShadowLocations; @@ -486,6 +488,8 @@ void RenderDeferredSetup::run(const render::SceneContextPointer& sceneContext, c locations = deferredLightingEffect->_directionalAmbientSphereLightShadowLocations; } } else { + // If the keylight has an ambient Map then use the Skybox version of the pass + // otherwise use the ambient sphere version if (keyLight->getAmbientMap()) { program = deferredLightingEffect->_directionalSkyboxLight; locations = deferredLightingEffect->_directionalSkyboxLightLocations;