diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype index 77caf42834..f1d8952bb2 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype @@ -1254,9 +1254,9 @@ "displayName": " Distance Attenuation", "description": "Attenuation applied to hide artifacts due to low-res shadow maps (e.g. objects far to the camera when using directional lights or objects far to the light when using sphere/disk lights", "type": "float", - "defaultValue": 4.0, + "defaultValue": 0.5, "min": 0.0, - "softMax": 10.0, + "softMax": 4.0, "connection": { "type": "ShaderInput", "name": "m_distanceAttenuation" diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype index d42f62d0ac..59d8be914e 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype @@ -668,9 +668,9 @@ "displayName": " Distance Attenuation", "description": "Attenuation applied to hide artifacts due to low-res shadow maps (e.g. objects far to the camera when using directional lights or objects far to the light when using sphere/disk lights", "type": "float", - "defaultValue": 4.0, + "defaultValue": 0.5, "min": 0.0, - "softMax": 10.0, + "softMax": 4.0, "connection": { "type": "ShaderInput", "name": "m_distanceAttenuation" diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli index 87dd42fd28..47ec914815 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli @@ -90,7 +90,7 @@ float3 GetBackLighting(Surface surface, LightingData lightingData, float3 lightI // result = T(s) * lightIntensity * surface.albedo * E * transmissionParams.w; // Distance attenuation applied to hide artifacts due to low-res projected areas onto shadowmaps (might need some work in the future) - result *= 1.0 / pow(max(1.0, sqrt(attenuationDistance)), lightingData.distanceAttenuation + 1.0); + result /= max(1.0, attenuationDistance * attenuationDistance * lightingData.distanceAttenuation); } break; }