From 6472b75bcd70470fe5775d1cf6eb70a75b3d76e5 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Mon, 4 Dec 2023 16:50:06 -0600 Subject: SL-20611 Followup -- fix edge cases with transparent objects around eye/object above/below water. --- .../app_settings/shaders/class3/deferred/fullbrightShinyF.glsl | 2 -- .../newview/app_settings/shaders/class3/deferred/materialF.glsl | 9 ++------- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'indra/newview/app_settings/shaders/class3') diff --git a/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl index 6446015b03..8430cca325 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl @@ -85,8 +85,6 @@ void main() color.rgb = srgb_to_linear(color.rgb); applyLegacyEnv(color.rgb, legacyenv, spec, pos, norm, env_intensity); - color.rgb = atmosFragLighting(color.rgb, additive, atten); - color = applyWaterFogViewLinear(pos.xyz, color); #endif color.a = 1.0; diff --git a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl index 1880f0c870..ec1e49eeb4 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl @@ -37,9 +37,7 @@ uniform float emissive_brightness; // fullbright flag, 1.0 == fullbright, 0.0 otherwise uniform int sun_up_factor; -vec4 applyWaterFogViewLinear(vec3 pos, vec4 color); - -vec3 atmosFragLightingLinear(vec3 l, vec3 additive, vec3 atten); +vec4 applySkyAndWaterFog(vec3 pos, vec3 additive, vec3 atten, vec4 color); vec3 scaleSoftClipFragLinear(vec3 l); void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive); void calcHalfVectors(vec3 lv, vec3 n, vec3 v, out vec3 h, out vec3 l, out float nh, out float nl, out float nv, out float vh, out float lightDist); @@ -399,10 +397,7 @@ void main() color += light; - color.rgb = atmosFragLightingLinear(color.rgb, additive, atten); - - vec4 temp = applyWaterFogViewLinear(pos, vec4(color, 0.0)); - color = temp.rgb; + color.rgb = applySkyAndWaterFog(pos.xyz, additive, atten, vec4(color, 1.0)).rgb; glare *= 1.0-emissive; glare = min(glare, 1.0); -- cgit v1.2.3