diff options
author | Dave Parks <davep@lindenlab.com> | 2013-05-29 20:46:29 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2013-05-29 20:46:29 -0500 |
commit | ee4c2e837bd9b414997ba75e823ac533fc4b82bc (patch) | |
tree | 295cad5f08dffe9929a60cd91b8229d1c0c50a81 /indra | |
parent | 81b9a070b622e805b640ac0f632162a5a5f392ce (diff) |
Fix for rigged attachments not having specular highlights with legacy shininess.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/lldrawpoolavatar.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 2bdfe2b986..7e8bdfba2c 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1665,20 +1665,22 @@ void LLDrawPoolAvatar::renderRigged(LLVOAvatar* avatar, U32 type, bool glow) gGL.getTexUnit(normal_channel)->bind(face->getTexture(LLRender::NORMAL_MAP)); gGL.getTexUnit(specular_channel)->bind(face->getTexture(LLRender::SPECULAR_MAP)); - LLColor4U col = mat->getSpecularLightColor(); - U8 spec = mat->getSpecularLightExponent(); + LLColor4 col = mat->getSpecularLightColor(); + F32 spec = mat->getSpecularLightExponent()/255.f; F32 env = mat->getEnvironmentIntensity()/255.f; if (mat->getSpecularID().isNull()) { env = te->getShiny()*0.25f; + col.set(env,env,env,0); + spec = env; } BOOL fullbright = te->getFullbright(); sVertexProgram->uniform1f(LLShaderMgr::EMISSIVE_BRIGHTNESS, fullbright ? 1.f : 0.f); - sVertexProgram->uniform4f(LLShaderMgr::SPECULAR_COLOR, col.mV[0]/255.f, col.mV[1]/255.f, col.mV[2]/255.f, spec/255.f); + sVertexProgram->uniform4f(LLShaderMgr::SPECULAR_COLOR, col.mV[0], col.mV[1], col.mV[2], spec); sVertexProgram->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, env); if (mat->getDiffuseAlphaMode() == LLMaterial::DIFFUSE_ALPHA_MODE_MASK) |