summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-rwxr-xr-xindra/newview/lldrawpoolwater.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 5ddc15df42..6774926f62 100755
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -522,13 +522,20 @@ void LLDrawPoolWater::shade()
F32 eyedepth = LLViewerCamera::getInstance()->getOrigin().mV[2] - gAgent.getRegion()->getWaterHeight();
- if (deferred_render)
+ if (eyedepth < 0.f && LLPipeline::sWaterReflections)
{
- shader = &gDeferredWaterProgram;
+ if (deferred_render)
+ {
+ shader = &gDeferredUnderWaterProgram;
+ }
+ else
+ {
+ shader = &gUnderWaterProgram;
+ }
}
- else if (eyedepth < 0.f && LLPipeline::sWaterReflections)
+ else if (deferred_render)
{
- shader = &gUnderWaterProgram;
+ shader = &gDeferredWaterProgram;
}
else
{