From bf7696369686aceec4a19c704450ccfdf9363658 Mon Sep 17 00:00:00 2001 From: Ken Pruiksma Date: Thu, 10 Jun 2021 16:12:02 -0500 Subject: [PATCH] [ATOM-15683] StandardPBR shader now makes sure to mark w for no subsurface scattering. Currently all StandardPBR materials are being subject to a 2x2 box blur because the DiffuseSpecalarMerge pass thinks they have samples with subsurface scattering turned on, and this is degrading the quality of diffuse. (#1249) --- .../Assets/Materials/Types/StandardPBR_ForwardPass.azsl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ForwardPass.azsl b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ForwardPass.azsl index b221ee0a33..23e4ef0c10 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ForwardPass.azsl +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR_ForwardPass.azsl @@ -295,6 +295,10 @@ PbrLightingOutput ForwardPassPS_Common(VSOutput IN, bool isFrontFace, out float lightingOutput.m_diffuseColor.rgb += lightingOutput.m_specularColor.rgb; // add specular lightingOutput.m_specularColor.rgb = baseColor * (1.0 - lightingOutput.m_diffuseColor.w); } + else + { + lightingOutput.m_diffuseColor.w = -1; // Disable subsurface scattering + } return lightingOutput; } @@ -341,4 +345,3 @@ ForwardPassOutput StandardPbr_ForwardPassPS_EDS(VSOutput IN, bool isFrontFace : #endif return OUT; } -