Signed-off-by: Santi Paprika <santi.gonzalez.cs@gmail.com>
This commit is contained in:
Santi Paprika
2021-12-23 21:02:02 +01:00
parent 46abff3093
commit 6dbb8e1794
2 changed files with 2 additions and 5 deletions
@@ -28,9 +28,6 @@ class LightingData
// Direction light shadow coordinates
float3 shadowCoords[ViewSrg::MaxCascadeCount];
// Direction light shadow coordinates for shrinked positions (used in scattering through thin objects)
float3 shrinkedShadowCoords[ViewSrg::MaxCascadeCount];
// (N . L) to accept below (N . L = 0) in scattering through thin objects
float transmissionNdLBias;
@@ -37,7 +37,7 @@ void ApplyDirectionalLights(Surface surface, inout LightingData lightingData)
shadowIndex,
surface.position - lightingData.shrinkFactor * surface.vertexNormal,
surface.normal,
lightingData.shrinkedShadowCoords);
shrinkedShadowCoords);
if (o_transmission_mode == TransmissionMode::ThickObject)
{
@@ -47,7 +47,7 @@ void ApplyDirectionalLights(Surface surface, inout LightingData lightingData)
{
// Use shrinked positions for thin object transmission to ensure they fall onto the object when querying
// the depth from the shadow map
transmissionDistance = DirectionalLightShadow::GetThickness(shadowIndex, lightingData.shrinkedShadowCoords);
transmissionDistance = DirectionalLightShadow::GetThickness(shadowIndex, shrinkedShadowCoords);
}
}