From d65fb7cec8ce36ce7f6ff082f8d04bdd8bc0208c Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Mon, 25 Nov 2024 20:56:03 -0500 Subject: Drop emissive on old Intel GPUs (#3110) * #3103 Add the ability to disable the emissive buffer for older GPUs with low memory bandwidth. * #3135 Add a "vintage" mode for slower GPUs * #2719 Fix for skies being overbrightened * #2632 Do not apply tonemapping on legacy skies --- indra/newview/llsettingsvo.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'indra/newview/llsettingsvo.cpp') diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index fee0bbcda4..b1bef4c4d8 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -794,6 +794,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force) F32 g = getGamma(); + static LLCachedControl hdr(gSavedSettings, "RenderHDREnabled"); static LLCachedControl should_auto_adjust(gSavedSettings, "RenderSkyAutoAdjustLegacy", true); static LLCachedControl auto_adjust_ambient_scale(gSavedSettings, "RenderSkyAutoAdjustAmbientScale", 0.75f); static LLCachedControl auto_adjust_hdr_scale(gSavedSettings, "RenderSkyAutoAdjustHDRScale", 2.f); @@ -801,10 +802,15 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force) static LLCachedControl auto_adjust_blue_density_scale(gSavedSettings, "RenderSkyAutoAdjustBlueDensityScale", 1.f); static LLCachedControl auto_adjust_sun_color_scale(gSavedSettings, "RenderSkyAutoAdjustSunColorScale", 1.f); static LLCachedControl sunlight_scale(gSavedSettings, "RenderSkySunlightScale", 1.5f); + static LLCachedControl sunlight_hdr_scale(gSavedSettings, "RenderHDRSkySunlightScale", 1.5f); static LLCachedControl ambient_scale(gSavedSettings, "RenderSkyAmbientScale", 1.5f); - shader->uniform1f(LLShaderMgr::SKY_SUNLIGHT_SCALE, sunlight_scale); + // sky is a "classic" sky following pre SL 7.0 shading + bool classic_mode = psky->canAutoAdjust(); + + shader->uniform1f(LLShaderMgr::SKY_SUNLIGHT_SCALE, hdr ? sunlight_hdr_scale : sunlight_scale); shader->uniform1f(LLShaderMgr::SKY_AMBIENT_SCALE, ambient_scale); + shader->uniform1i(LLShaderMgr::CLASSIC_MODE, classic_mode); F32 probe_ambiance = getReflectionProbeAmbiance(); -- cgit v1.2.3