From 71b7648d13f1182865cf7d584670088da8939ee0 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Tue, 23 Aug 2022 02:55:30 -0700 Subject: SL-17975: PBR: Factor ambient occlusion into specular --- .../app_settings/shaders/class3/deferred/softenLightF.glsl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index cd12003f89..6a4060beaa 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -267,7 +267,7 @@ void main() #if DEBUG_PBR_REFLECT0_BASE vec3 debug_reflect0 = vec3(calcF0(IOR)); #endif - + float ao = packedORM.r; float metal = packedORM.b; vec3 c_diff = mix(diffuse.rgb,vec3(0),metal); vec3 reflect90 = vec3(0); @@ -345,7 +345,9 @@ void main() #if DEBUG_PBR_DIFFUSE_PRE_AO vec3 debug_diffuse = colorDiffuse; #endif - colorDiffuse *= packedORM.r; // Occlusion -- NOTE: pbropaque will need occlusion_strength pre-multiplied into spec.r + + colorDiffuse *= ao; // Occlusion -- NOTE: pbropaque will need occlusion_strength pre-multiplied into spec.r + colorSpec *= ao; // Add in sun/moon reflection if (metal > 0.0) @@ -382,7 +384,7 @@ void main() color.rgb = diffuse.rgb; #endif #if DEBUG_PBR_OCCLUSION - color.rgb = vec3(packedORM.r); + color.rgb = vec3(ao); #endif #if DEBUG_PBR_ORM color.rgb = packedORM; -- cgit v1.2.3