From 716f6b93355500c0aee378c0ce86a7dedcc24a9a Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 2 Jul 2013 15:30:42 -0500 Subject: NORSPEC-290 Disable occlusion culling for distortion render target since there are generally zero under water occluders. --- indra/newview/pipeline.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 14529099b5..97abbc2815 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9208,12 +9208,13 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) water_clip = 1; } + S32 occlusion = LLPipeline::sUseOcclusion; + LLPipeline::sUseOcclusion = 0; + if (!LLViewerCamera::getInstance()->cameraUnderWater()) { //generate planar reflection map //disable occlusion culling for reflection map for now - S32 occlusion = LLPipeline::sUseOcclusion; - LLPipeline::sUseOcclusion = 0; gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); glClearColor(0,0,0,0); mWaterRef.bindTarget(); @@ -9317,7 +9318,6 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) gGL.popMatrix(); mWaterRef.flush(); glh_set_current_modelview(current); - LLPipeline::sUseOcclusion = occlusion; } camera.setOrigin(camera_in.getOrigin()); @@ -9373,6 +9373,8 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) LLPipeline::sUnderWaterRender = FALSE; mWaterDis.flush(); } + + LLPipeline::sUseOcclusion = occlusion; last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate; LLPipeline::sReflectionRender = FALSE; -- cgit v1.2.3