diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index e3dcc44c4d..1e7d881bfe 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -50,6 +50,8 @@ #include "llsettingssky.h" #include "llsettingswater.h" +#pragma optimize("", off) + static float sTime; BOOL deferred_render = FALSE; @@ -589,19 +591,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); } } |