diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-08-23 02:55:30 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-08-23 02:55:30 -0700 |
commit | 71b7648d13f1182865cf7d584670088da8939ee0 (patch) | |
tree | 7690cb124128008afda17ce2fadce7ca1548dead /indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl | |
parent | 7951a1554324054cfb8947272a82e21913145865 (diff) |
SL-17975: PBR: Factor ambient occlusion into specular
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl | 8 |
1 files changed, 5 insertions, 3 deletions
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; |