diff options
author | Graham Linden <graham@lindenlab.com> | 2018-08-14 21:10:54 +0100 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2018-08-14 21:10:54 +0100 |
commit | 8e9d27fdcdea805d5f9af02f853f5dfdfa7c7512 (patch) | |
tree | 20976c001c3695c238443f3a0846c99c5044bc21 /indra | |
parent | 2a7600fbd2a29cb6ac34767ed82eeef1fa4a1fbe (diff) |
MAINT-8884 Re-arrange water norm/reflection tex binding to be less incorrect.
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); } } |