From eff7acfb1caaa092a88555fca752dc9aea11625e Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 29 Apr 2019 08:53:09 -0700 Subject: Remove hack mul of sunlight in alpha shader and add some taps for debugging the lighting pipe. --- indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl | 7 ++++--- .../newview/app_settings/shaders/class1/deferred/softenLightF.glsl | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/newview/app_settings/shaders/class1') diff --git a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl index d11b81d2d3..11fcb3e87a 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/alphaF.glsl @@ -204,7 +204,6 @@ void main() vec3 atten; calcAtmosphericVars(pos.xyz, 1.0, sunlit, amblit, additive, atten); - sunlit *= 0.5; vec2 abnormal = encode_normal(norm.xyz); @@ -240,12 +239,14 @@ vec3 post_sunlight = color.rgb; vec3 post_diffuse = color.rgb; - //color.rgb = mix(diff.rgb, color.rgb, final_alpha); + color.rgb = mix(diff.rgb, color.rgb, final_alpha); + + //color.rgb = srgb_to_linear(color.rgb); color.rgb = atmosFragLighting(color.rgb, additive, atten); color.rgb = scaleSoftClipFrag(color.rgb); - //color.rgb = srgb_to_linear(color.rgb); +vec3 post_atmo = color.rgb; vec4 light = vec4(0,0,0,0); diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index e0fe6cfae1..afdd8cdda3 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -160,7 +160,9 @@ vec3 post_diffuse = col.rgb; col += speccol; } } - + + vec3 post_spec = col.rgb; + col.rgb += diffuse.a * diffuse.rgb; if (envIntensity > 0.0) @@ -176,6 +178,8 @@ vec3 post_diffuse = col.rgb; col = scaleSoftClipFrag(col); } +vec3 post_atmo = col.rgb; + #ifdef WATER_FOG vec4 fogged = applyWaterFogView(pos.xyz,vec4(col, bloom)); col = fogged.rgb; -- cgit v1.2.3