From 8bd90b49b1b1c9a500381e2c60e0cec02693d292 Mon Sep 17 00:00:00 2001 From: Runitai <> Date: Wed, 2 Dec 2009 11:46:14 -0600 Subject: EXT-2737 Fix for terrain/avatars/trees not showing up in water reflection. --- indra/newview/pipeline.cpp | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'indra/newview/pipeline.cpp') diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 21b297c4ee..282eddf380 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7189,6 +7189,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); glClearColor(0,0,0,0); mWaterRef.bindTarget(); + gGL.setColorMask(true, true); + mWaterRef.clear(); + gGL.setColorMask(true, false); + mWaterRef.getViewport(gGLViewport); stop_glerror(); @@ -7221,6 +7225,21 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) U32 ref_mask = 0; if (LLDrawPoolWater::sNeedsDistortionUpdate) { + //initial sky pass (no user clip plane) + { //mask out everything but the sky + U32 tmp = mRenderTypeMask; + mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) | + (1 << LLPipeline::RENDER_TYPE_WL_SKY)); + static LLCullResult result; + updateCull(camera, result); + stateSort(camera, result); + mRenderTypeMask = tmp & ((1 << LLPipeline::RENDER_TYPE_SKY) | + (1 << LLPipeline::RENDER_TYPE_CLOUDS) | + (1 << LLPipeline::RENDER_TYPE_WL_SKY)); + renderGeom(camera, TRUE); + mRenderTypeMask = tmp; + } + U32 mask = mRenderTypeMask; mRenderTypeMask &= ~((1<