diff options
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 11 | ||||
-rw-r--r-- | indra/llrender/llrender.h | 9 | ||||
-rw-r--r-- | indra/llrender/llshadermgr.cpp | 6 | ||||
-rw-r--r-- | indra/llrender/llshadermgr.h | 2 |
4 files changed, 20 insertions, 8 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 37bcf0c163..ff79efcc5b 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -767,18 +767,19 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms) S32 diffuseMap = glGetUniformLocationARB(mProgramObject, "diffuseMap"); S32 specularMap = glGetUniformLocationARB(mProgramObject, "specularMap"); S32 bumpMap = glGetUniformLocationARB(mProgramObject, "bumpMap"); + S32 altDiffuseMap = glGetUniformLocationARB(mProgramObject, "altDiffuseMap"); S32 environmentMap = glGetUniformLocationARB(mProgramObject, "environmentMap"); std::set<S32> skip_index; - if (-1 != diffuseMap && (-1 != specularMap || -1 != bumpMap || -1 != environmentMap)) + if (-1 != diffuseMap && (-1 != specularMap || -1 != bumpMap || -1 != environmentMap || -1 != altDiffuseMap)) { GLenum type; GLsizei length; GLint size = -1; char name[1024]; - diffuseMap = specularMap = bumpMap = environmentMap = -1; + diffuseMap = altDiffuseMap = specularMap = bumpMap = environmentMap = -1; for (S32 i = 0; i < activeCount; i++) { @@ -815,6 +816,12 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString> * uniforms) environmentMap = i; continue; } + + if (-1 == altDiffuseMap && std::string(name) == "altDiffuseMap") + { + altDiffuseMap = i; + continue; + } } bool specularDiff = specularMap < diffuseMap && -1 != specularMap; diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h index 1bc5e89eac..62cd526550 100644 --- a/indra/llrender/llrender.h +++ b/indra/llrender/llrender.h @@ -265,10 +265,11 @@ public: enum eTexIndex { - DIFFUSE_MAP = 0, - NORMAL_MAP, - SPECULAR_MAP, - NUM_TEXTURE_CHANNELS, + DIFFUSE_MAP = 0, + ALTERNATE_DIFFUSE_MAP = 1, + NORMAL_MAP = 1, + SPECULAR_MAP = 2, + NUM_TEXTURE_CHANNELS = 3, }; enum eVolumeTexIndex diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp index fd187b99ee..ebdfbd89b2 100644 --- a/indra/llrender/llshadermgr.cpp +++ b/indra/llrender/llshadermgr.cpp @@ -552,8 +552,8 @@ void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns, const std::string& if (log.length() > 0) { - LL_INFOS("ShaderErrors") << "Shader loading from " << fname << ":\n" << LL_ENDL; - LL_INFOS("ShaderErrors") << log << LL_ENDL; + LL_WARNS("ShaderLoading") << "Shader loading from " << fname << ":\n" << LL_ENDL; + LL_WARNS("ShaderLoading") << log << LL_ENDL; } } @@ -1144,6 +1144,7 @@ void LLShaderMgr::initAttribsAndUniforms() mReservedUniforms.push_back("color"); mReservedUniforms.push_back("diffuseMap"); + mReservedUniforms.push_back("altDiffuseMap"); mReservedUniforms.push_back("specularMap"); mReservedUniforms.push_back("bumpMap"); mReservedUniforms.push_back("environmentMap"); @@ -1309,6 +1310,7 @@ void LLShaderMgr::initAttribsAndUniforms() mReservedUniforms.push_back("scattering_texture"); mReservedUniforms.push_back("single_mie_scattering_texture"); mReservedUniforms.push_back("irradiance_texture"); + mReservedUniforms.push_back("blend_factor"); llassert(mReservedUniforms.size() == END_RESERVED_UNIFORMS); diff --git a/indra/llrender/llshadermgr.h b/indra/llrender/llshadermgr.h index 9919dbe31a..3fac21883f 100644 --- a/indra/llrender/llshadermgr.h +++ b/indra/llrender/llshadermgr.h @@ -74,6 +74,7 @@ public: PROJECTOR_AMBIENT_LOD, DIFFUSE_COLOR, DIFFUSE_MAP, + ALTERNATE_DIFFUSE_MAP, SPECULAR_MAP, BUMP_MAP, ENVIRONMENT_MAP, @@ -227,6 +228,7 @@ public: SCATTER_TEX, SINGLE_MIE_SCATTER_TEX, ILLUMINANCE_TEX, + BLEND_FACTOR, END_RESERVED_UNIFORMS } eGLSLReservedUniforms; |