diff options
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index aa426cd785..2f3c52ecd2 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -137,6 +137,14 @@ void LLDrawPoolWater::endPostDeferredPass(S32 pass) void LLDrawPoolWater::renderDeferred(S32 pass) { LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER); + + if (!LLPipeline::sRenderTransparentWater) + { + // Will render opaque water without use of ALM + render(pass); + return; + } + deferred_render = TRUE; shade(); deferred_render = FALSE; @@ -337,7 +345,13 @@ void LLDrawPoolWater::render(S32 pass) // for low end hardware void LLDrawPoolWater::renderOpaqueLegacyWater() { - LLVOSky *voskyp = gSky.mVOSkyp; + LL_PROFILE_ZONE_SCOPED; + LLVOSky *voskyp = gSky.mVOSkyp; + + if (voskyp == NULL) + { + return; + } LLGLSLShader* shader = NULL; if (LLGLSLShader::sNoFixedFunction) @@ -444,6 +458,7 @@ void LLDrawPoolWater::renderOpaqueLegacyWater() void LLDrawPoolWater::renderReflection(LLFace* face) { + LL_PROFILE_ZONE_SCOPED; LLVOSky *voskyp = gSky.mVOSkyp; if (!voskyp) @@ -472,6 +487,7 @@ void LLDrawPoolWater::renderReflection(LLFace* face) void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& light_diffuse, const LLVector3& light_dir, F32 light_exp) { + LL_PROFILE_ZONE_SCOPED; F32 water_height = LLEnvironment::instance().getWaterHeight(); F32 camera_height = LLViewerCamera::getInstance()->getOrigin().mV[2]; F32 eyedepth = camera_height - water_height; @@ -680,7 +696,8 @@ void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& li void LLDrawPoolWater::shade() { - if (!deferred_render) + LL_PROFILE_ZONE_SCOPED; + if (!deferred_render) { gGL.setColorMask(true, true); } |