diff options
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl | 4 | ||||
-rw-r--r-- | indra/newview/llsettingsvo.cpp | 18 |
3 files changed, 13 insertions, 11 deletions
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index c4ce3af157..8d0b37d01f 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -1000,7 +1000,7 @@ LLVector3 LLSettingsSky::getLightDirection() const return mMoonDirection; } - return -LLVector3::z_axis; + return LLVector3::z_axis_neg; } LLColor3 LLSettingsSky::getLightDiffuse() const diff --git a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl index 3607f5a086..dcc3750a8f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/multiPointLightF.glsl @@ -100,7 +100,9 @@ void main() float fa = light_col[i].a+1.0; float dist_atten = clamp(1.0-(dist-1.0*(1.0-fa))/fa, 0.0, 1.0); dist_atten *= dist_atten; - dist_atten *= 2.0; + + // Tweak falloff slightly to match pre-EEP attenuation + dist_atten *= 2.2; dist_atten *= noise; diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index bbee94287d..d96f276a71 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -641,17 +641,17 @@ void LLSettingsVOSky::updateSettings() LLVector3 sun_direction = getSunDirection(); LLVector3 moon_direction = getMoonDirection(); - F32 dp = getLightDirection() * LLVector3(0.0f, 0.0f, 1.0f); - if (dp < 0) - { - dp = 0; - } - dp = llmax(dp, 0.1f); + // Want the dot prod of sun w/ high noon vector (0,0,1), which is just the z component + F32 dp = llmax(sun_direction[2], 0.0f); // clamped to 0 when sun is down - // Since WL scales everything by 2, there should always be at least a 2:1 brightness ratio - // between sunlight and point lights in windlight to normalize point lights. + // Since WL scales everything by 2, there should always be at least a 2:1 brightness ratio + // between sunlight and point lights in windlight to normalize point lights. + // + // After some A/B comparison of relesae vs EEP, tweak to allow strength to fall below 2 + // at night, for better match. (mSceneLightStrength is a divisor, so lower value means brighter + // local lights) F32 sun_dynamic_range = llmax(gSavedSettings.getF32("RenderSunDynamicRange"), 0.0001f); - mSceneLightStrength = 2.0f * (1.0f + sun_dynamic_range * dp); + mSceneLightStrength = 2.0f * (0.75f + sun_dynamic_range * dp); gSky.setSunAndMoonDirectionsCFR(sun_direction, moon_direction); gSky.setSunTextures(getSunTextureId(), getNextSunTextureId()); |