diff options
Diffstat (limited to 'indra/newview/lldrawpoolavatar.cpp')
-rwxr-xr-x | indra/newview/lldrawpoolavatar.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index e58c2c1037..42a23faa49 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1790,9 +1790,12 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) if (mat) { - gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture(LLRender::DIFFUSE_MAP)); - gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP)); + //order is important here LLRender::DIFFUSE_MAP should be last, becouse it change + //(gGL).mCurrTextureUnitIndex gGL.getTexUnit(specular_channel)->bind(face->getTexture(LLRender::SPECULAR_MAP)); + gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP)); + gGL.getTexUnit(sDiffuseChannel)->bind(face->getTexture(LLRender::DIFFUSE_MAP), false, true); + LLColor4 col = mat->getSpecularLightColor(); F32 spec = mat->getSpecularLightExponent()/255.f; |