diff options
author | Graham Linden <graham@lindenlab.com> | 2018-08-15 21:34:06 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-08-15 21:34:06 +0100 |
commit | c5b0d4ccd074b7062e5100c3b021da53170eb30c (patch) | |
tree | 6600bff8fd4d7f8af3f8d7929c511fbe3d6dc533 /indra/newview/lldrawpoolwater.cpp | |
parent | ec0fe8078c1f64c1579f382a686282ddbb82f470 (diff) | |
parent | f028ddd0754d5a2fd2f2300aa02eff4fe6cfa96f (diff) |
Merge
Diffstat (limited to 'indra/newview/lldrawpoolwater.cpp')
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 19 |
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); } } |