From 17655e576fc261bb3a9d42542a37eb319510e4d3 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Thu, 9 May 2019 16:43:02 -0700 Subject: SL-11149 Fix fullbright colorspace handling and atmo transport. --- indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl') diff --git a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl index f98fc0d518..c104dc884f 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/fullbrightF.glsl @@ -45,6 +45,8 @@ VARYING vec2 vary_texcoord0; vec4 applyWaterFogView(vec3 pos, vec4 color); #endif +vec3 srgb_to_linear(vec3 cs); +vec3 linear_to_srgb(vec3 cl); vec3 fullbrightAtmosTransport(vec3 light); vec3 fullbrightScaleSoftClip(vec3 light); @@ -70,15 +72,17 @@ void main() #endif color.rgb *= vertex_color.rgb; - + #ifdef WATER_FOG vec3 pos = vary_position; vec4 fogged = applyWaterFogView(pos, vec4(color.rgb, final_alpha)); color.rgb = fogged.rgb; color.a = fogged.a; #else + color.rgb = srgb_to_linear(color.rgb); color.rgb = fullbrightAtmosTransport(color.rgb); color.rgb = fullbrightScaleSoftClip(color.rgb); + color.rgb = linear_to_srgb(color.rgb); color.a = final_alpha; #endif -- cgit v1.2.3