diff options
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r-- | indra/newview/llface.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 85ee33edb1..174d8e34d1 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -302,6 +302,11 @@ void LLFace::setDiffuseMap(LLViewerTexture* tex) setTexture(LLRender::DIFFUSE_MAP, tex); } +void LLFace::setAlternateDiffuseMap(LLViewerTexture* tex) +{ + setTexture(LLRender::ALTERNATE_DIFFUSE_MAP, tex); +} + void LLFace::setNormalMap(LLViewerTexture* tex) { setTexture(LLRender::NORMAL_MAP, tex); @@ -1414,17 +1419,16 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (shiny_in_alpha) { - - static const GLfloat alpha[4] = + static const GLfloat SHININESS_TO_ALPHA[4] = { - 0.00f, - 0.25f, - 0.5f, - 0.75f + 0.0000f, + 0.3333f, + 0.6666f, + 1.0000f }; llassert(tep->getShiny() <= 3); - color.mV[3] = U8 (alpha[tep->getShiny()] * 255); + color.mV[3] = U8 (SHININESS_TO_ALPHA[tep->getShiny()] * 255); } } } @@ -1710,7 +1714,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, // that emboss mapping always shows up on the upward faces of cubes when // it's noon (since a lot of builders build with the sun forced to noon). LLVector3 sun_ray = gSky.mVOSkyp->mBumpSunDir; - LLVector3 moon_ray = gSky.getMoonDirection(); + LLVector3 moon_ray = gSky.mVOSkyp->getMoon().getDirection(); LLVector3& primary_light_ray = (sun_ray.mV[VZ] > 0) ? sun_ray : moon_ray; bump_s_primary_light_ray.load3((offset_multiple * s_scale * primary_light_ray).mV); |