summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
index d7f0ab6d8e..4b4063f51c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/spotLightF.glsl
@@ -84,6 +84,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);
@@ -99,7 +100,8 @@ 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));
float det = min(lod/(proj_lod*0.5), 1.0);
@@ -116,7 +118,8 @@ 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);
float d = dot(dist,dist);
@@ -184,6 +187,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 &&
@@ -205,8 +209,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;
amb_da += (da*0.5)*proj_ambiance;
@@ -226,6 +228,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);