From de0863ed6e91fda0c1b5342b9fecf07c4af47d63 Mon Sep 17 00:00:00 2001 From: Geenz Date: Fri, 11 Jan 2013 07:19:27 -0500 Subject: Linearize spotlight textures. --- .../app_settings/shaders/class2/deferred/multiSpotLightF.glsl | 6 ++++++ indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'indra/newview/app_settings/shaders/class2/deferred') diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl index 5621e47ab7..695887c5ff 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl @@ -71,6 +71,8 @@ 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); float det = max(1.0-lod/(proj_lod*0.5), 0.0); @@ -86,6 +88,8 @@ 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); @@ -103,6 +107,8 @@ 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); diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl index 6d6ad6d565..525dd32106 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl @@ -71,6 +71,8 @@ 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); float det = max(1.0-lod/(proj_lod*0.5), 0.0); @@ -86,6 +88,8 @@ 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); @@ -103,6 +107,8 @@ 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); -- cgit v1.2.3