summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2021-01-06 17:36:10 -0800
committerPtolemy <ptolemy@lindenlab.com>2021-01-06 17:38:24 -0800
commitdaa957b93ba173feb69d003dbc578e621a9a68e3 (patch)
tree5331e222f25ad8e7ec21be7d3b1a874f11307ed3 /indra/newview/app_settings/shaders/class2
parent5af5498cf60b98c6ca00a1341ec4099b6cf0ffe9 (diff)
SL-14035: Incorporate patch from Sovereign Engineer to fix specular reflection
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl5
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl2
3 files changed, 4 insertions, 7 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index 5d7a28c359..1b7a1cc6ec 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -191,10 +191,6 @@ void main()
float da = dot(norm, lv);
vec3 diff_tex = texture2DRect(diffuseRect, frag.xy).rgb;
- // SL-12005 Projector light pops as we get closer, more objectionable than being in wrong color space.
- // We can't switch to linear here unless we do it everywhere*
- // *gbuffer IS sRGB, convert to linear since this shader outputs linear
- diff_tex.rgb = srgb_to_linear(diff_tex.rgb);
vec4 spec = texture2DRect(specularRect, frag.xy);
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index f4db53e0b7..7700d16007 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -87,8 +87,9 @@ void main()
float light_gamma = 1.0 / 1.3;
da = pow(da, light_gamma);
- vec4 diffuse = texture2DRect(diffuseRect, tc);
- vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
+ vec4 diffuse = texture2DRect(diffuseRect, tc);
+ diffuse.rgb = linear_to_srgb(diffuse.rgb); // SL-14025
+ vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy);
vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
scol_ambocc = pow(scol_ambocc, vec2(light_gamma));
diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
index 5ab0b5c5b4..774f537821 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl
@@ -189,7 +189,7 @@ void main()
lv = normalize(lv);
float da = dot(norm, lv);
- vec3 diff_tex = srgb_to_linear(texture2DRect(diffuseRect, frag.xy).rgb);
+ vec3 diff_tex = texture2DRect(diffuseRect, frag.xy).rgb;
vec4 spec = texture2DRect(specularRect, frag.xy);
vec3 dlit = vec3(0, 0, 0);