From 64302d3000b69b31e72eb6a3bd8a981c80cb88de Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 1 Jun 2018 00:18:36 +0100 Subject: Modify use of sky settings, reduce complexity, and name funcs to indicate coord systems in use. Fix class2 softenLightF shader. --- indra/newview/llface.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 5af4cd89c4..a880cfa2a2 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -42,7 +42,6 @@ #include "llrender.h" #include "lllightconstants.h" #include "llsky.h" -#include "llenvironment.h" #include "llviewercamera.h" #include "llviewertexturelist.h" #include "llvopartgroup.h" @@ -1626,14 +1625,11 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, { tep->getScale( &s_scale, &t_scale ); } - - LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky(); - // Use the nudged south when coming from above sun angle, such // 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 = psky->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); -- cgit v1.2.3 From a0598b12656cdcf22ba95cacd01b5ff36f8f1b26 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 11 Jun 2018 17:46:16 +0100 Subject: Fix water fog consolidation in underwater shaders. Add plumbing facilities to allow current and next moon textures to be passed to moon shader. Modify moon shader to blend between current and next moon textures by blend factor. --- indra/newview/llface.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 3f2247c9c5..1acb1650cd 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -306,6 +306,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); -- cgit v1.2.3 From 12cd42221e16b8bbcd0ad115e0436b075d47d485 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 30 Jan 2019 08:54:29 -0800 Subject: SL-10416 Replace hope and asserts with checks in LLFace::setTexture in hopes of side-stepping media texture crash. --- indra/newview/llface.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 8df898f8a9..6d0e999845 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -389,16 +389,20 @@ void LLFace::switchTexture(U32 ch, LLViewerTexture* new_texture) return; } - llassert(mTexture[ch].notNull()); - - new_texture->addTextureStats(mTexture[ch]->getMaxVirtualSize()) ; + if (mTexture[ch].notNull()) + { + new_texture->addTextureStats(mTexture[ch]->getMaxVirtualSize()) ; + } if (ch == LLRender::DIFFUSE_MAP) { - getViewerObject()->changeTEImage(mTEOffset, new_texture) ; + if (getViewerObject()) + { + getViewerObject()->changeTEImage(mTEOffset, new_texture); + } } - setTexture(ch, new_texture) ; + setTexture(ch, new_texture); dirtyTexture(); } -- cgit v1.2.3 From 4be51fa5598c2ec2aa8dca2e0f00ef79a0732e1e Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Fri, 7 Feb 2020 16:17:15 -0800 Subject: DRTVWR-440: SL-12574: Tweak environment cube map to better match Windlight --- indra/newview/llface.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 209dc010d4..174d8e34d1 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1419,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); } } } -- cgit v1.2.3 From edb4373f7d2a32beb93a7f69ddcdf5e1bc0eb6a1 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 5 Mar 2020 14:13:39 +0200 Subject: SL-9775 FIXED EEP viewer crash when looking at the sun (which is playing parcel media) --- indra/newview/llface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 174d8e34d1..59269c2115 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -168,7 +168,8 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) mImportanceToCamera = 0.f ; mBoundingSphereRadius = 0.0f ; - mHasMedia = FALSE ; + mHasMedia = false ; + mIsMediaAllowed = true; } void LLFace::destroy() -- cgit v1.2.3 From 3d22273726ab4d40f2eb9afc5ceeac37471a9dfa Mon Sep 17 00:00:00 2001 From: Runitai Linden Date: Tue, 24 Mar 2020 11:22:01 -0500 Subject: Fix for bad fullbright shiny shininess values and inconsistency between materialF and fullbrightShinyF --- indra/newview/llface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 59269c2115..18ea184da6 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1423,9 +1423,9 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, static const GLfloat SHININESS_TO_ALPHA[4] = { 0.0000f, - 0.3333f, - 0.6666f, - 1.0000f + 0.25f, + 0.5f, + 0.75f }; llassert(tep->getShiny() <= 3); -- cgit v1.2.3