summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
diff options
context:
space:
mode:
authorRunitai Linden <davep@lindenlab.com>2020-03-05 16:28:06 -0600
committerRunitai Linden <davep@lindenlab.com>2020-03-05 16:28:06 -0600
commit7c7d71269f5b47397d14bbe44e341e4ac1d96889 (patch)
treeea9ff1c27a6e067d225929b2f28d637db32d20bf /indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
parent90ad38db065877be16371e7814a39618135a30ab (diff)
WIP - Windlight sun lighting should happen in sRGB space, not linear space. This keeps ambient from getting overblown and better matches environment lighting with ALM on/off.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index 7cde67d11b..5d7a28c359 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -192,8 +192,9 @@ void main()
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
- //diff_tex.rgb = srgb_to_linear(diff_tex.rgb);
+ // 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);
@@ -296,6 +297,7 @@ void main()
//not sure why, but this line prevents MATBUG-194
col = max(col, vec3(0.0));
- frag_color.rgb = col;
+ //output linear
+ frag_color.rgb = col;
frag_color.a = 0.0;
}