diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/pipeline.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 9b89af20d2..0784f3acdd 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -9459,12 +9459,14 @@ 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); @@ -9603,8 +9605,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.popMatrix(); mWaterRef.flush(); - set_current_modelview(current); - LLPipeline::sUseOcclusion = occlusion; + set_current_modelview(current); } camera.setOrigin(camera_in.getOrigin()); @@ -9708,6 +9709,8 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) } last_update = LLDrawPoolWater::sNeedsReflectionUpdate && LLDrawPoolWater::sNeedsDistortionUpdate; + LLPipeline::sUseOcclusion = occlusion; + LLPipeline::sUnderWaterRender = false; LLPipeline::sReflectionRender = false; |