Slight improvements
This commit is contained in:
+5
-11
@@ -101,20 +101,14 @@ void ApplyPointLight(ViewSrg::PointLight light, Surface surface, inout LightingD
|
||||
{
|
||||
const float3 Directions[6] = {float3(0,0,1), float3(0,0,-1), float3(0,1,0), float3(0,-1,0), float3(1,0,0), float3(-1,0,0)};
|
||||
const int shadowDirectionIndex = GetShadowDirectionIndex(surface.position, light.m_position);
|
||||
|
||||
{
|
||||
|
||||
litRatio *= ProjectedShadow::GetVisibility(
|
||||
GetShadowIndex(light, shadowDirectionIndex),
|
||||
const int shadowIndex = GetShadowIndex(light, shadowDirectionIndex);
|
||||
litRatio *= ProjectedShadow::GetVisibility(
|
||||
shadowIndex,
|
||||
light.m_position,
|
||||
surface.position,
|
||||
Directions[shadowDirectionIndex],
|
||||
surface.normal);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
// Use backShadowRatio to carry thickness from shadow map for thick mode
|
||||
backShadowRatio = 1.0 - litRatio;
|
||||
if (o_transmission_mode == TransmissionMode::ThickObject)
|
||||
@@ -122,7 +116,7 @@ void ApplyPointLight(ViewSrg::PointLight light, Surface surface, inout LightingD
|
||||
backShadowRatio = ProjectedShadow::GetThickness(
|
||||
shadowIndex,
|
||||
surface.position);
|
||||
} */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace AZ
|
||||
ProjectedShadowFeatureProcessorInterface::ProjectedShadowDescriptor desc = m_shadowFeatureProcessor->GetShadowProperties(shadowId);
|
||||
Vector3 position = Vector3::CreateFromFloat3(pointLight.m_position.data());
|
||||
|
||||
desc.m_fieldOfViewYRadians = 1.58825f;
|
||||
desc.m_fieldOfViewYRadians = DegToRad(90.5f); // Make it slightly larger than 90 degrees to avoid artifacts on the boundary between 2 cubemap faces
|
||||
desc.m_transform = Transform::CreateLookAt(position, position + m_directions[i]);
|
||||
desc.m_aspectRatio = 1.0f;
|
||||
desc.m_nearPlaneDistance = 0.1f;
|
||||
|
||||
Reference in New Issue
Block a user