summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-05-15 11:01:24 -0500
committerRunitaiLinden <davep@lindenlab.com>2023-05-15 11:01:24 -0500
commitcdc9852f052d804f8b25564ab7d90eb2b79cddd4 (patch)
tree1aab4d69fb7e85c814b1c77895b039348269e522 /indra/newview/app_settings/shaders/class3
parente3f9244375e3ddfb96a38afac007f0a5a68d3b46 (diff)
SL-19709 Fix for fullbright shiny not factoring out exposure and flickering fullbright alpha. Incidental decruft.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl
index 6b7dc7ac1d..f1b1997c43 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl
@@ -43,8 +43,9 @@ VARYING vec3 vary_position;
uniform samplerCube environmentMap;
-vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
-
+vec3 atmosFragLighting(vec3 light, vec3 additive, vec3 atten);
+vec3 legacy_adjust_fullbright(vec3 c);
+vec3 legacy_adjust(vec3 c);
void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao);
vec3 linear_to_srgb(vec3 c);
@@ -84,10 +85,13 @@ void main()
vec3 norm = normalize(vary_texcoord1.xyz);
vec4 spec = vec4(0,0,0,0);
sampleReflectionProbesLegacy(ambenv, glossenv, legacyenv, vec2(0), pos.xyz, norm.xyz, spec.a, env_intensity);
- applyLegacyEnv(color.rgb, legacyenv, spec, pos, norm, env_intensity);
+ color.rgb = legacy_adjust(color.rgb);
color.rgb = srgb_to_linear(color.rgb);
- color.rgb = fullbrightAtmosTransportFrag(color.rgb, additive, atten);
+ color.rgb = legacy_adjust_fullbright(color.rgb);
+
+ applyLegacyEnv(color.rgb, legacyenv, spec, pos, norm, env_intensity);
+ color.rgb = atmosFragLighting(color.rgb, additive, atten);
#endif
color.a = 1.0;