summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-04-04 12:29:12 -0500
committerGitHub <noreply@github.com>2023-04-04 10:29:12 -0700
commit698966f8e7ddcc0b123a83d7c4e381778f8cd8ab (patch)
tree38132d861fbd835d36963e6a4c71048ac957d163 /indra/newview/app_settings/shaders/class3
parent7be7c66b0e43baef64871dac278eac5726e28d25 (diff)
SL-19538 Remove hacky ambiance scale and take the mittens off probe a… (#151)
* SL-19538 Remove hacky ambiance scale and take the mittens off probe ambiance values. Fix for sky brightening being done in sRGB space.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/materialF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/environment/waterF.glsl4
4 files changed, 2 insertions, 15 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl b/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl
index b90de7609b..f6bed16c84 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/fullbrightShinyF.glsl
@@ -43,9 +43,7 @@ VARYING vec3 vary_position;
uniform samplerCube environmentMap;
-vec3 fullbrightShinyAtmosTransport(vec3 light);
vec3 fullbrightAtmosTransportFrag(vec3 light, vec3 additive, vec3 atten);
-vec3 fullbrightScaleSoftClip(vec3 light);
void calcAtmosphericVars(vec3 inPositionEye, vec3 light_dir, float ambFactor, out vec3 sunlit, out vec3 amblit, out vec3 additive, out vec3 atten, bool use_ao);
@@ -88,9 +86,8 @@ void main()
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 = fullbrightAtmosTransportFrag(color.rgb, additive, atten);
- color.rgb = fullbrightScaleSoftClip(color.rgb);
color.rgb = srgb_to_linear(color.rgb);
+ color.rgb = fullbrightAtmosTransportFrag(color.rgb, additive, atten);
#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 6e41df34a4..02ab4494f6 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/materialF.glsl
@@ -44,7 +44,6 @@ vec4 applyWaterFogView(vec3 pos, vec4 color);
vec3 atmosFragLightingLinear(vec3 l, vec3 additive, vec3 atten);
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);
-vec3 fullbrightAtmosTransportFragLinear(vec3 light, vec3 additive, vec3 atten);
vec3 srgb_to_linear(vec3 cs);
vec3 linear_to_srgb(vec3 cs);
@@ -386,10 +385,7 @@ void main()
glare += cur_glare;
}
- color.rgb = linear_to_srgb(color.rgb);
color.rgb = atmosFragLightingLinear(color.rgb, additive, atten);
- color.rgb = scaleSoftClipFragLinear(color.rgb);
- color.rgb = srgb_to_linear(color.rgb);
vec3 npos = normalize(-pos.xyz);
vec3 light = vec3(0, 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 0e3ebd1534..7953360054 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -71,7 +71,6 @@ vec4 getPositionWithDepth(vec2 pos_screen, float depth);
void calcAtmosphericVarsLinear(vec3 inPositionEye, vec3 norm, vec3 light_dir, out vec3 sunlit, out vec3 amblit, out vec3 atten, out vec3 additive);
vec3 atmosFragLightingLinear(vec3 l, vec3 additive, vec3 atten);
vec3 scaleSoftClipFragLinear(vec3 l);
-vec3 fullbrightAtmosTransportFragLinear(vec3 light, vec3 additive, vec3 atten);
// reflection probe interface
void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv,
@@ -212,6 +211,7 @@ void main()
{
//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;
}
else
{
@@ -262,9 +262,7 @@ void main()
if (do_atmospherics)
{
- color = linear_to_srgb(color);
color = atmosFragLightingLinear(color, additive, atten);
- color = srgb_to_linear(color);
}
}
diff --git a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl
index 9da86759c9..ec0439fa97 100644
--- a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl
+++ b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl
@@ -282,11 +282,7 @@ void main()
color = mix(color, fb.rgb, f);
- color.rgb = linear_to_srgb(color.rgb);
color = atmosFragLightingLinear(color, additive, atten);
- color = scaleSoftClipFragLinear(color);
- color.rgb = srgb_to_linear(color.rgb);
-
float spec = min(max(max(punctual.r, punctual.g), punctual.b), 0.05);