summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
diff options
context:
space:
mode:
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, 6 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
index b3ab8fd510..cfdb53b5cc 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl
@@ -82,6 +82,7 @@ vec3 decode_normal (vec2 enc)
vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
+ ret.rgb = pow(ret.rgb, vec3(2.2));
vec2 dist = tc-vec2(0.5);
@@ -97,6 +98,7 @@ vec4 texture2DLodSpecular(sampler2D projectionMap, vec2 tc, float lod)
vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
+ ret.rgb = pow(ret.rgb, vec3(2.2));
vec2 dist = vec2(0.5) - abs(tc-vec2(0.5));
@@ -114,6 +116,7 @@ vec4 texture2DLodDiffuse(sampler2D projectionMap, vec2 tc, float lod)
vec4 texture2DLodAmbient(sampler2D projectionMap, vec2 tc, float lod)
{
vec4 ret = texture2DLod(projectionMap, tc, lod);
+ ret.rgb = pow(ret.rgb, vec3(2.2));
vec2 dist = tc-vec2(0.5);
@@ -193,6 +196,7 @@ void main()
vec3 col = vec3(0,0,0);
vec3 diff_tex = texture2DRect(diffuseRect, frag.xy).rgb;
+ diff_tex = pow(diff_tex, vec3(2.2));
float noise = texture2D(noiseMap, frag.xy/128.0).b;
if (proj_tc.z > 0.0 &&
@@ -214,8 +218,6 @@ void main()
vec3 lcol = color.rgb * plcol.rgb * plcol.a;
lit = da * dist_atten * noise;
-
- lit = pow(lit, 0.7);
col = lcol*lit*diff_tex*shadow;
amb_da += (da*0.5)*(1.0-shadow)*proj_ambiance;
@@ -235,6 +237,8 @@ void main()
vec4 spec = texture2DRect(specularRect, frag.xy);
+ spec.rgb = pow(spec.rgb, vec3(2.2));
+
if (spec.a > 0.0)
{
vec3 ref = reflect(normalize(pos), norm);