diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-05-25 13:09:03 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-05-25 13:09:03 -0500 |
commit | c12712aa9609325ba3247a67354e91e9342106d6 (patch) | |
tree | cbd3f62efcd268b005c88c832cdeda8dfaa96281 /indra/newview/app_settings/shaders/class1 | |
parent | 64a59928d0c03389bfce4cc95f5c4a565111dcb6 (diff) |
DRTVWR-559 Fix for off-color fullbright alpha blinn-phong materials. Scrub some NaNs.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl | 2 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/environment/srgbF.glsl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl index ee425f97fc..c8afacf9bb 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/luminanceF.glsl @@ -47,6 +47,6 @@ void main() tc.y -= 0.1; // HACK - nudge exposure sample down a little bit to favor ground over sky vec3 c = texture(diffuseRect, tc).rgb + texture(emissiveRect, tc).rgb; float L = lum(c); - frag_color = vec4(L); + frag_color = vec4(max(L, 0.0)); } diff --git a/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl b/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl index 689c345b2c..7111a822c8 100644 --- a/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl +++ b/indra/newview/app_settings/shaders/class1/environment/srgbF.glsl @@ -124,7 +124,7 @@ vec3 legacy_adjust(vec3 c) vec3 legacy_adjust_fullbright(vec3 c) { - float exp_scale = texture(exposureMap, vec2(0.5, 0.5)).r; + float exp_scale = clamp(texture(exposureMap, vec2(0.5, 0.5)).r, 0.01, 10.0); return c / exp_scale * 1.34; //magic 1.34 arrived at by binary search for a value that reproduces midpoint grey consistenty } |