From d7fe16e36dbcd44175bab6299f33f20ed9974aad Mon Sep 17 00:00:00 2001 From: Beq Date: Tue, 28 May 2024 14:39:18 +0100 Subject: [PATCH] Minor speedup for local lights in busy scenes --- indra/newview/pipeline.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 8d047c209f..827b64906b 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -8219,6 +8219,12 @@ void LLPipeline::renderDeferredLighting() const F32 *c = center.getF32ptr(); F32 s = volume->getLightRadius() * 1.5f; + // relocated above colour calc for early exit on small lights + if (s <= 0.001f) + { + continue; + } + // // send light color to shader in linear space LLColor3 col = volume->getLightLinearColor() * light_scale; @@ -8226,12 +8232,12 @@ void LLPipeline::renderDeferredLighting() { continue; } - - if (s <= 0.001f) - { - continue; - } - + // relocated above colour calc for early exit on small lights + // if (s <= 0.001f) + // { + // continue; + // } + // LLVector4a sa; sa.splat(s); if (camera->AABBInFrustumNoFarClip(center, sa) == 0)