summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolwater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-rw-r--r--indra/newview/lldrawpoolwater.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index e3dcc44c4d..ad4df751fd 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -589,19 +589,32 @@ void LLDrawPoolWater::shade()
//bind normal map
S32 bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP);
- if (mWaterNormp[0] && mWaterNormp[1])
+ if (mWaterNormp[0])
{
gGL.getTexUnit(bumpTex)->bind(mWaterNormp[0]) ;
- gGL.getTexUnit(bumpTex + 1)->bind(mWaterNormp[1]) ;
if (gSavedSettings.getBOOL("RenderWaterMipNormal"))
{
mWaterNormp[0]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
- mWaterNormp[1]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
}
else
{
mWaterNormp[0]->setFilteringOption(LLTexUnit::TFO_POINT);
+ }
+ }
+
+ if (mWaterNormp[1])
+ {
+ bumpTex = shader->enableTexture(LLViewerShaderMgr::BUMP_MAP2);
+
+ gGL.getTexUnit(bumpTex)->bind(mWaterNormp[1]) ;
+
+ if (gSavedSettings.getBOOL("RenderWaterMipNormal"))
+ {
+ mWaterNormp[1]->setFilteringOption(LLTexUnit::TFO_ANISOTROPIC);
+ }
+ else
+ {
mWaterNormp[1]->setFilteringOption(LLTexUnit::TFO_POINT);
}
}