diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/EnhancedLighting.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/EnhancedLighting.azsli index 46a9f6f6f5..0484e9fa41 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/EnhancedLighting.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/EnhancedLighting.azsli @@ -28,7 +28,7 @@ float3 GetDiffuseLighting(Surface surface, LightingData lightingData, float3 lig } else { - diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight); + diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight, lightingData.diffuseResponse); } if(o_clearCoat_feature_enabled) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/SkinLighting.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/SkinLighting.azsli index cf97c85529..b839fb7225 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/SkinLighting.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/SkinLighting.azsli @@ -28,7 +28,7 @@ float3 GetDiffuseLighting(Surface surface, LightingData lightingData, float3 lig } else { - diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight); + diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight, lightingData.diffuseResponse); } if(o_clearCoat_feature_enabled) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli index a0b3f83bbc..51eb9d324f 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lighting/StandardLighting.azsli @@ -20,7 +20,7 @@ // Then define the Diffuse and Specular lighting functions float3 GetDiffuseLighting(Surface surface, LightingData lightingData, float3 lightIntensity, float3 dirToLight) { - float3 diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight); + float3 diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight, lightingData.diffuseResponse); if(o_clearCoat_feature_enabled) { diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli index 3d3fc1f625..59b8ba3fc9 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Microfacet/Brdf.azsli @@ -21,10 +21,10 @@ // ------- Diffuse Lighting ------- //! Simple Lambertian BRDF. -float3 DiffuseLambertian(float3 albedo, float3 normal, float3 dirToLight) +float3 DiffuseLambertian(float3 albedo, float3 normal, float3 dirToLight, float diffuseResponse) { float NdotL = saturate(dot(normal, dirToLight)); - return albedo * NdotL * INV_PI; + return albedo * NdotL * INV_PI * diffuseResponse; } // Normalized Disney diffuse function taken from Frostbite's PBR course notes (page 10):