From 6b836eacafd21c1ccac2c7276483ed393a4b406e Mon Sep 17 00:00:00 2001 From: Geenz Date: Thu, 18 Apr 2013 19:43:30 -0400 Subject: Use GL_SRGB8_ALPHA8 for the diffuse and specular buffers, and correct gamma *before* glow and other post processing effects that don't care about being gamma correct. --- .../newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl | 2 -- indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl | 2 -- indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl | 3 --- 3 files changed, 7 deletions(-) (limited to 'indra/newview/app_settings/shaders/class2') diff --git a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl index cfdb53b5cc..31f5c8afbb 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/multiSpotLightF.glsl @@ -196,7 +196,6 @@ 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 && @@ -237,7 +236,6 @@ void main() vec4 spec = texture2DRect(specularRect, frag.xy); - spec.rgb = pow(spec.rgb, vec3(2.2)); if (spec.a > 0.0) { diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl index e8f3a02c5a..c7e5908d39 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl @@ -296,7 +296,6 @@ void main() float da = max(dot(norm.xyz, sun_dir.xyz), 0.0); vec4 diffuse = texture2DRect(diffuseRect, tc); - diffuse.rgb = pow(diffuse.rgb, vec3(2.2)); vec3 col; float bloom = 0.0; @@ -304,7 +303,6 @@ void main() if (diffuse.a < 0.9) { vec4 spec = texture2DRect(specularRect, vary_fragcoord.xy); - spec.rgb = pow(spec.rgb, vec3(2.2)); vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg; float scol = max(scol_ambocc.r, diffuse.a); diff --git a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl index 7ce327d1e0..65a14c542c 100644 --- a/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl +++ b/indra/newview/app_settings/shaders/class2/deferred/spotLightF.glsl @@ -197,8 +197,6 @@ 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 && @@ -239,7 +237,6 @@ 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); -- cgit v1.2.3