diff options
author | Graham Madarasz <graham@lindenlab.com> | 2019-08-16 14:57:27 +0000 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2019-08-16 14:57:27 +0000 |
commit | 98d926afd7fba39cac373a89705851ad8bb2258e (patch) | |
tree | f4a9195a4f04140c6eeebe1a428a658b58a24549 | |
parent | 886fe3eefc8688df206e7b397a6b9438c7492f5f (diff) | |
parent | 8dc048be46f167ab1be993ca22b79997a491c680 (diff) |
Merged in graham_linden/viewer-eep-g (pull request #478)
SL-11589. SL-11212
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 14 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl | 2 | ||||
-rw-r--r-- | indra/newview/lldrawpoolwater.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 5 |
5 files changed, 8 insertions, 17 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 434270d178..35bd9a2254 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -1313,23 +1313,10 @@ void LLSettingsSky::calculateLightSettings() const componentMultBy(sunlight, componentExp((light_atten * -1.f) * lighty)); componentMultBy(sunlight, light_transmittance); - F32 max_color = llmax(sunlight.mV[0], sunlight.mV[1], sunlight.mV[2]); - if (max_color > 1.0f) - { - sunlight *= 1.0f/max_color; - } - //increase ambient when there are more clouds LLColor3 tmpAmbient = ambient + (smear(1.f) - ambient) * cloud_shadow * 0.5; componentMultBy(tmpAmbient, light_transmittance); - //tmpAmbient = LLColor3::clamp(tmpAmbient, getGamma(), 1.0f); - max_color = llmax(tmpAmbient.mV[0], tmpAmbient.mV[1], tmpAmbient.mV[2]); - if (max_color > 1.0f) - { - tmpAmbient *= 1.0f/max_color; - } - //brightness of surface both sunlight and ambient mSunDiffuse = sunlight; mSunAmbient = tmpAmbient; @@ -1347,7 +1334,6 @@ void LLSettingsSky::calculateLightSettings() const LLColor3 moonlight_b(0.66, 0.66, 1.2); // scotopic ambient value componentMultBy(moonlight, componentExp((light_atten * -1.f) * lighty)); - clampColor(moonlight, getGamma(), 1.0f); mMoonDiffuse = componentMult(moonlight, light_transmittance) * moon_brightness; mMoonAmbient = componentMult(moonlight_b, light_transmittance) * 0.0125f; diff --git a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl index 20ab0fb171..8e90c1481f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/cloudsV.glsl @@ -78,7 +78,7 @@ void main() // Get relative position vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0); - altitude_blend_factor = (P.y > -4096.0) ? 1.0 : 1.0 - clamp(abs(P.y) / max_y, 0.0, 1.0); + altitude_blend_factor = clamp((P.y + 512.0) / max_y, 0.0, 1.0); // Set altitude if (P.y > 0.) diff --git a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl index 18daa5a242..2c1475d547 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/cloudsV.glsl @@ -78,7 +78,7 @@ void main() vec3 P = position.xyz - camPosLocal.xyz + vec3(0,50,0); // fade clouds beyond a certain point so the bottom of the sky dome doesn't look silly at high altitude - altitude_blend_factor = (P.y > -4096.0) ? 1.0 : 1.0 - clamp(abs(P.y) / max_y, 0.0, 1.0); + altitude_blend_factor = clamp((P.y + 512.0) / max_y, 0.0, 1.0); // Set altitude if (P.y > 0.) diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp index 13420fc001..073adfb627 100644 --- a/indra/newview/lldrawpoolwater.cpp +++ b/indra/newview/lldrawpoolwater.cpp @@ -600,7 +600,7 @@ void LLDrawPoolWater::shade2(bool edge, LLGLSLShader* shader, const LLColor3& li shader->uniform1f(LLShaderMgr::WATER_FRESNEL_OFFSET, pwater->getFresnelOffset()); shader->uniform1f(LLShaderMgr::WATER_BLUR_MULTIPLIER, pwater->getBlurMultiplier()); - F32 sunAngle = llmax(0.f, light_dir.mV[2]); + F32 sunAngle = llmax(0.f, light_dir.mV[1]); F32 scaledAngle = 1.f - sunAngle; shader->uniform1i(LLShaderMgr::SUN_UP_FACTOR, environment.getIsSunUp() ? 1 : 0); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 706e2c6895..e3747eaec8 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5572,6 +5572,11 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) U32 mask = mat->getShaderMask(alpha_mode); pool->addRiggedFace(facep, mask); } + + if(vobj->isAnimatedObject() && vobj->isRiggedMesh()) + { + pool->updateRiggedVertexBuffers(vobj->getAvatar()); + } } else if (mat) { |