From c69d7bab9955172393ff0cc3223077154f23b4b2 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Tue, 28 Jun 2022 10:34:32 -0700 Subject: SL-17274: PBR: Move amblit to before PBR shading --- .../shaders/class3/deferred/softenLightF.glsl | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index b628a0265f..bb14ca471d 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -189,6 +189,8 @@ void main() vec3 legacyenv; sampleReflectionProbes(ambenv, glossenv, legacyenv, pos.xyz, norm.xyz, spec.a, envIntensity); + amblit = max(ambenv, amblit); + bool hasPBR = GET_GBUFFER_FLAG(GBUFFER_FLAG_HAS_PBR); if (hasPBR) { @@ -345,10 +347,24 @@ void main() #if DEBUG_PBR_DOT_BV color.rgb = vec3(dotBV); #endif + #if DEBUG_PBR_FE_GGX + color.rgb = FssEssGGX; // spec + #endif + #if DEBUG_PBR_FE_LAMBERT + color.rgb = FssEssLambert; // diffuse + #endif +color.rgb = vec3(dotNV); +color.rgb = vec3(brdfPoint,0.0); +color.rgb = vec3(vScaleBias,0.0); +color.rgb = fresnelR; +color.rgb = kSpec; +color.rgb = reflection; +color.rgb = specLight; +//color.rgb = FssEssGGX; + } else { - amblit = max(ambenv, amblit); color.rgb = amblit*ambocc; //float ambient = min(abs(dot(norm.xyz, sun_dir.xyz)), 1.0); -- cgit v1.2.3