diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-04-05 11:55:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 11:55:51 -0500 |
commit | 1f79379bf215c5368337c64b4f72c7c9ef3e09c2 (patch) | |
tree | 0864f4005090f49a59c0eabca3bd7760b5c1cf5e /indra/newview/app_settings/shaders/class3 | |
parent | d6d634d29ff351450306e211982a98a0050f1b42 (diff) |
SL-19538 Followup -- tune exposure parameters and clamp local light ambiance. Make render targets 16F and scrube NaNs (thanks Rye). Update midday. (#154)
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
3 files changed, 5 insertions, 8 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl index 0fb30559d4..23ba95949a 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/multiPointLightF.glsl @@ -176,7 +176,7 @@ void main() } } - frag_color.rgb = final_color; + frag_color.rgb = max(final_color, vec3(0)); frag_color.a = 0.0; #endif // LOCAL_LIGHT_KILL diff --git a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl index 8229ecbbb7..30b96ce8dc 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/pointLightF.glsl @@ -151,6 +151,6 @@ void main() } } - frag_color.rgb = final_color; + frag_color.rgb = max(final_color, vec3(0)); frag_color.a = 0.0; } diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index 7953360054..99beb0d890 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -90,6 +90,8 @@ uniform vec4 waterPlane; vec4 applyWaterFogViewLinear(vec3 pos, vec4 color); #endif +uniform float sky_hdr_scale; + void calcDiffuseSpecular(vec3 baseColor, float metallic, inout vec3 diffuseColor, inout vec3 specularColor); vec3 pbrBaseLight(vec3 diffuseColor, @@ -196,22 +198,17 @@ void main() vec3 v = -normalize(pos.xyz); color = vec3(1,0,1); color = pbrBaseLight(diffuseColor, specularColor, metallic, v, norm.xyz, perceptualRoughness, light_dir, sunlit_linear, scol, radiance, irradiance, colorEmissive, ao, additive, atten); - if (do_atmospherics) { - color = linear_to_srgb(color); color = atmosFragLightingLinear(color, additive, atten); - color = srgb_to_linear(color); } - - } else if (!GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_ATMOS)) { //should only be true of WL sky, just port over base color value color = srgb_to_linear(texture2D(emissiveRect, tc).rgb); - color *= sun_up_factor + 1.0; + color *= sun_up_factor * sky_hdr_scale + 1.0; } else { |