diff options
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 388dee00db..e814b77725 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -4687,7 +4687,7 @@ void LLPipeline::renderDebug() mReflectionMapManager.renderDebug(); } - if (gSavedSettings.getBOOL("RenderReflectionProbeVolumes")) + if (gSavedSettings.getBOOL("RenderReflectionProbeVolumes") && !hud_only) { LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("probe debug display"); @@ -4740,7 +4740,7 @@ void LLPipeline::renderDebug() } } - if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)) + if (hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA) && !hud_only) { LLVertexBuffer::unbind(); @@ -8572,10 +8572,13 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep) shader.uniform1f(LLShaderMgr::PROJECTOR_SHADOW_FADE, 1.f); } - //if (!gCubeSnapshot) + // make sure we're not already targeting the same spot light with both shadow maps + llassert(mTargetShadowSpotLight[0] != mTargetShadowSpotLight[1] || mTargetShadowSpotLight[0].isNull()); + + if (!gCubeSnapshot) { LLDrawable* potential = drawablep; - //determine if this is a good light for casting shadows + //determine if this light is higher priority than one of the existing spot shadows F32 m_pri = volume->getSpotLightPriority(); for (U32 i = 0; i < 2; i++) @@ -8584,7 +8587,7 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep) if (mTargetShadowSpotLight[i].notNull()) { - pri = mTargetShadowSpotLight[i]->getVOVolume()->getSpotLightPriority(); + pri = mTargetShadowSpotLight[i]->getVOVolume()->getSpotLightPriority(); } if (m_pri > pri) @@ -8597,6 +8600,9 @@ void LLPipeline::setupSpotLight(LLGLSLShader& shader, LLDrawable* drawablep) } } + // make sure we didn't end up targeting the same spot light with both shadow maps + llassert(mTargetShadowSpotLight[0] != mTargetShadowSpotLight[1] || mTargetShadowSpotLight[0].isNull()); + LLViewerTexture* img = volume->getLightTexture(); if (img == NULL) @@ -9886,7 +9892,6 @@ void LLPipeline::generateSunShadow(LLCamera& camera) } } - //hack to disable projector shadows bool gen_shadow = RenderShadowDetail > 1; @@ -9898,6 +9903,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera) F32 fade_amt = gFrameIntervalSeconds.value() * llmax(LLTrace::get_frame_recording().getLastRecording().getSum(*velocity_stat) / LLTrace::get_frame_recording().getLastRecording().getDuration().value(), 1.0); + // should never happen + llassert(mTargetShadowSpotLight[0] != mTargetShadowSpotLight[1] || mTargetShadowSpotLight[0].isNull()); + //update shadow targets for (U32 i = 0; i < 2; i++) { //for each current shadow @@ -9928,6 +9936,9 @@ void LLPipeline::generateSunShadow(LLCamera& camera) } } + // this should never happen + llassert(mShadowSpotLight[0] != mShadowSpotLight[1] || mShadowSpotLight[0].isNull()); + for (S32 i = 0; i < 2; i++) { set_current_modelview(saved_view); |