diff options
author | Dave Parks <davep@lindenlab.com> | 2023-02-27 13:26:33 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2023-02-27 13:26:33 -0600 |
commit | 41e694c33efa17122c82950a0dc366d72019a5b2 (patch) | |
tree | e05a6f4807946aa46ec8779bfce0126fbc922f22 /indra | |
parent | 4ec8844f012f27ddd0ab9aa6a3098273c7bb0ac1 (diff) |
DRTVWR-559 Fix for local lights being applied to fullbright objects.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/materialF.glsl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl index b00a6ed757..49529860be 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl @@ -382,11 +382,6 @@ void main() color.rgb = mix(atmosFragLightingLinear(color.rgb, additive, atten), fullbrightAtmosTransportFragLinear(color, additive, atten), emissive); color.rgb = scaleSoftClipFragLinear(color.rgb); -#ifdef WATER_FOG - vec4 temp = applyWaterFogView(pos, vec4(color, 0.0)); - color = temp.rgb; -#endif - vec3 npos = normalize(-pos.xyz); vec3 light = vec3(0, 0, 0); @@ -400,11 +395,18 @@ void main() LIGHT_LOOP(6) LIGHT_LOOP(7) + light *= 1.0-emissive; color += light; + glare *= 1.0-emissive; glare = min(glare, 1.0); float al = max(diffcol.a, glare) * vertex_color.a; +#ifdef WATER_FOG + vec4 temp = applyWaterFogView(pos, vec4(color, 0.0)); + color = temp.rgb; +#endif + frag_color = vec4(color, al); #else // mode is not DIFFUSE_ALPHA_MODE_BLEND, encode to gbuffer |