summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rwxr-xr-xindra/newview/lldrawpoolavatar.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 075299386e..45abb87bad 100755
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -297,7 +297,14 @@ void LLDrawPoolAvatar::beginDeferredRiggedMaterialAlpha(S32 pass)
pass += LLMaterial::SHADER_COUNT;
- sVertexProgram = &gDeferredMaterialProgram[pass];
+ if (LLPipeline::sUnderWaterRender)
+ {
+ sVertexProgram = &(gDeferredMaterialWaterProgram[pass]);
+ }
+ else
+ {
+ sVertexProgram = &(gDeferredMaterialProgram[pass]);
+ }
gPipeline.bindDeferredShader(*sVertexProgram);
sDiffuseChannel = sVertexProgram->enableTexture(LLViewerShaderMgr::DIFFUSE_MAP);
@@ -1092,7 +1099,14 @@ void LLDrawPoolAvatar::beginDeferredRiggedMaterial(S32 pass)
{ //skip alpha passes
return;
}
- sVertexProgram = &gDeferredMaterialProgram[pass+LLMaterial::SHADER_COUNT];
+ if (LLPipeline::sUnderWaterRender)
+ {
+ sVertexProgram = &gDeferredMaterialWaterProgram[pass+LLMaterial::SHADER_COUNT];
+ }
+ else
+ {
+ sVertexProgram = &gDeferredMaterialProgram[pass+LLMaterial::SHADER_COUNT];
+ }
sVertexProgram->bind();
normal_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::BUMP_MAP);
specular_channel = sVertexProgram->enableTexture(LLViewerShaderMgr::SPECULAR_MAP);