summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2019-08-28 14:27:14 -0700
committerGraham Linden <graham@lindenlab.com>2019-08-28 14:27:14 -0700
commit5b1dd8a18cbc221e768095f77f78072ee19c1e64 (patch)
treefb9e3f3a8178b2670c27a773e28eef7f4d353ad8 /indra
parentfd4a90858c9beb147eb312f3c41396435d389c4d (diff)
SL-11772
Modify behavior of culling while doing reflection/refraction passes.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llspatialpartition.cpp5
-rw-r--r--indra/newview/pipeline.cpp12
2 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index b24f37fc72..77bbcdada6 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1089,6 +1089,11 @@ public:
virtual bool earlyFail(LLViewerOctreeGroup* base_group)
{
+ if (LLPipeline::sReflectionRender)
+ {
+ return false;
+ }
+
LLSpatialGroup* group = (LLSpatialGroup*)base_group;
group->checkOcclusion();
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 99d11b7104..8dd7622494 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -2401,11 +2401,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
sCull->clear();
- bool to_texture = LLPipeline::sUseOcclusion > 1 &&
- !hasRenderType(LLPipeline::RENDER_TYPE_HUD) &&
- LLViewerCamera::sCurCameraID == LLViewerCamera::CAMERA_WORLD &&
- gPipeline.canUseVertexShaders() &&
- sRenderGlow;
+ bool to_texture = LLPipeline::sUseOcclusion > 1 && gPipeline.canUseVertexShaders();
if (to_texture)
{
@@ -2455,7 +2451,10 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
}
- camera.disableUserClipPlane();
+ if (!sReflectionRender)
+ {
+ camera.disableUserClipPlane();
+ }
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
@@ -2479,6 +2478,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl
if(vo_part)
{
bool do_occlusion_cull = can_use_occlusion && use_occlusion && !gUseWireframe && 0 > water_clip /* && !gViewerWindow->getProgressView()->getVisible()*/;
+ do_occlusion_cull &= !sReflectionRender;
vo_part->cull(camera, do_occlusion_cull);
}
}