From 5c6d52f260900a483b7c9d8421ed5619b897d026 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 8 May 2013 12:01:38 -0700 Subject: NORSPEC-156 modify fullbrightF colorspace conversion to eliminate delta with non-deferred fullbright look --- indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index b91aaf80fb..4dfd13d406 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -42,12 +42,9 @@ void main() { float shadow = 1.0; - vec4 color = diffuseLookup(vary_texcoord0.xy)*vertex_color; - color.rgb = pow(color.rgb, vec3(2.2)); + vec4 color = diffuseLookup(vary_texcoord0.xy)*pow(vertex_color.rgb,vec3(2.2f,2.2f,2.2f)); color.rgb = fullbrightAtmosTransport(color.rgb); - color.rgb = fullbrightScaleSoftClip(color.rgb); - frag_color = color; } -- cgit v1.2.3 From 8f5fc2d4c19dfaadc8113d17c219e3316e42d5bc Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 8 May 2013 12:14:08 -0700 Subject: NORSPEC-156 move gamma correction to vert shader --- indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 2 +- indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index 4dfd13d406..bb28f02aab 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -42,7 +42,7 @@ void main() { float shadow = 1.0; - vec4 color = diffuseLookup(vary_texcoord0.xy)*pow(vertex_color.rgb,vec3(2.2f,2.2f,2.2f)); + vec4 color = diffuseLookup(vary_texcoord0.xy)* vertex_color; color.rgb = fullbrightAtmosTransport(color.rgb); color.rgb = fullbrightScaleSoftClip(color.rgb); frag_color = color; diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl index 2e6982d101..dd56a8c2b0 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl @@ -58,7 +58,7 @@ void main() calcAtmospherics(pos.xyz); - vertex_color = diffuse_color; - + vertex_color.rgb = pow(diffuse_color, vec3(2.2f,2.2f,2.2f)); + vertex_color.a = diffuse_color.a; } -- cgit v1.2.3 From 5aaab576ba42d35449ec8696d79aeb85d6d8015c Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 8 May 2013 12:53:47 -0700 Subject: NORSPEC-156 back to the fix that actually works --- indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 5 ++++- indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl | 6 ++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index bb28f02aab..cb050c800f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -42,9 +42,12 @@ void main() { float shadow = 1.0; - vec4 color = diffuseLookup(vary_texcoord0.xy)* vertex_color; + vec4 color = diffuseLookup(vary_texcoord0.xy) * pow(vertex_color.rgb,vec3(2.2f)); + color.rgb = fullbrightAtmosTransport(color.rgb); + color.rgb = fullbrightScaleSoftClip(color.rgb); + frag_color = color; } diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl index dd56a8c2b0..3f09a15375 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightV.glsl @@ -57,8 +57,6 @@ void main() vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy; calcAtmospherics(pos.xyz); - - vertex_color.rgb = pow(diffuse_color, vec3(2.2f,2.2f,2.2f)); - vertex_color.a = diffuse_color.a; - + + vertex_color = diffuse_color; } -- cgit v1.2.3 From ae0f362f220c54e72700b96545b9f4956ee8a113 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 8 May 2013 20:00:38 -0700 Subject: Rollback NORSPEC-156 change which fails to compile due to implicit cast --- indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index cb050c800f..8d76485886 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -42,7 +42,8 @@ void main() { float shadow = 1.0; - vec4 color = diffuseLookup(vary_texcoord0.xy) * pow(vertex_color.rgb,vec3(2.2f)); + vec4 color = diffuseLookup(vary_texcoord0.xy) * vertex_color; + color.rgb = pow(color.rgb,vec3(2.2f,2.2f,2.2f)); color.rgb = fullbrightAtmosTransport(color.rgb); -- cgit v1.2.3