MAINT-8884 Re-arrange water norm/reflection tex binding to be less incorrect.
parent
2a7600fbd2
commit
8e9d27fdcd
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue