diff options
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rwxr-xr-x | indra/newview/pipeline.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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; |