From 024933d4a177997467dc97271610dcb5f450363b Mon Sep 17 00:00:00 2001 From: Santi Paprika Date: Fri, 4 Feb 2022 12:15:45 +0100 Subject: [PATCH] Improve descriptions and comments (https://github.com/o3de/o3de/pull/6428#discussion_r799207891, https://github.com/o3de/o3de/pull/6428#discussion_r799213620) Signed-off-by: Santi Paprika --- .../Common/Assets/Materials/Types/EnhancedPBR.materialtype | 2 +- .../Feature/Common/Assets/Materials/Types/Skin.materialtype | 2 +- .../Assets/ShaderLib/Atom/Features/PBR/BackLighting.azsli | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype index 9186efd385..846c3d0f34 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype @@ -1244,7 +1244,7 @@ { "name": "distanceAttenuation", "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", + "description": "Attenuation of the transmission effect, used to hide artifacts due to low-res shadow maps\nFor directional lights: attenuation proportional to the distance from the object to the camera.\nFor other light sources: attenuation proportional to the distance from the object to the light source.", "type": "float", "defaultValue": 0.5, "min": 0.0, diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype index 13d2a09a2f..1edbd7e505 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype @@ -658,7 +658,7 @@ { "name": "distanceAttenuation", "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", + "description": "Attenuation of the transmission effect, used to hide artifacts due to low-res shadow maps\nFor directional lights: attenuation proportional to the distance from the object to the camera.\nFor other light sources: attenuation proportional to the distance from the object to the light source.", "type": "float", "defaultValue": 0.5, "min": 0.0, 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 82a3038054..e43f2729b7 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 @@ -72,9 +72,8 @@ float3 GetBackLighting(Surface surface, LightingData lightingData, float3 lightI } // Irradiance arround surface point. - // Albedo at front (surface point) is used to approximate irradiance at the back of the object - // See observation 4 in [Jimenez J. et al, 2010] - // Increase angle of influence (angle(N,L) -> angle(N,L) + acos(transmissionNdLBias)) to smooth transition regions + // Albedo at front (surface point) is used to approximate irradiance at the back of the object (observation 4 in [Jimenez J. et al, 2010]) + // Increase angle of influence to smooth transition regions float3 E = surface.albedo * saturate(lightingData.transmissionNdLBias + dot(-surface.normal, dirToLight)); // Transmission distance modulated by hardcoded constant C and the thickness exposed parameter (in this case modulating the distance traversed by the light inside the object)