diff options
Diffstat (limited to 'indra/newview/app_settings/shaders')
5 files changed, 7 insertions, 13 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl index 861b78c961..4c860cdde0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl @@ -36,6 +36,7 @@ uniform sampler2D exposureMap; uniform float dt; uniform vec2 noiseVec; +uniform vec3 dynamic_exposure_params; float lum(vec3 col) { @@ -81,7 +82,7 @@ void main() float L = lum(col); - float s = clamp(0.175/L, 0.125, 1.3); + float s = clamp(dynamic_exposure_params.x/L, dynamic_exposure_params.y, dynamic_exposure_params.z); float prev = texture(exposureMap, vec2(0.5,0.5)).r; diff --git a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl index 257a76c663..6ecbfaecb1 100644 --- a/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl +++ b/indra/newview/app_settings/shaders/class2/windlight/atmosphericsHelpersV.glsl @@ -54,8 +54,4 @@ vec3 scaleDownLight(vec3 light) return (light / scene_light_strength ); } -vec3 scaleUpLight(vec3 light) -{ - return (light * scene_light_strength); -} 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 { |