summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
diff options
context:
space:
mode:
authorMichael Pohoreski <ptolemy@lindenlab.com>2021-01-07 18:49:32 +0000
committerMichael Pohoreski <ptolemy@lindenlab.com>2021-01-07 18:49:32 +0000
commitc73fbe30820276c4d6cf6801e02ea241d5cfb4ee (patch)
tree89a7fd32777fe39efae966dba1a5cedd2801f84b /indra/newview/app_settings/shaders/class2
parent5af5498cf60b98c6ca00a1341ec4099b6cf0ffe9 (diff)
parentf89db964071121812baa4d81ce065f3579701251 (diff)
Merged in SL-14035 (pull request #427)
SL-14035/ BUG-229436 Specular reflection too bright when the camera is outside the light radius
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);