Fixes from feedback
This commit is contained in:
@@ -56,7 +56,6 @@ void MainCS(uint3 dispatchId: SV_DispatchThreadID)
|
||||
return; // Early return if filter is disabled.
|
||||
}
|
||||
|
||||
float depth = 0.;
|
||||
switch (o_shadowmapLightType)
|
||||
{
|
||||
case ShadowmapLightType::Directional:
|
||||
@@ -68,7 +67,7 @@ void MainCS(uint3 dispatchId: SV_DispatchThreadID)
|
||||
// and it often causes light bleeding with ESM.
|
||||
// So this converts it to "depth" to emphasize the difference
|
||||
// within the frustum.
|
||||
depth = (depthInClip - distanceMin) / (1. - distanceMin);
|
||||
const float depth = (depthInClip - distanceMin) / (1. - distanceMin);
|
||||
|
||||
// Todo: Expose Esm exponent slider for directional lights
|
||||
// This would remove the exp calculation below, collapsing it into a subtraction in DirectionalLightShadow.azsli
|
||||
@@ -76,7 +75,6 @@ void MainCS(uint3 dispatchId: SV_DispatchThreadID)
|
||||
const float outValue = exp(EsmExponentialShift * depth);
|
||||
PassSrg::m_outputShadowmap[dispatchId].r = outValue;
|
||||
break;
|
||||
|
||||
}
|
||||
case ShadowmapLightType::Spot:
|
||||
{
|
||||
|
||||
@@ -162,6 +162,7 @@ namespace AZ::Render
|
||||
|
||||
void ProjectedShadowFeatureProcessor::SetPcfMethod(ShadowId id, PcfMethod method)
|
||||
{
|
||||
AZ_Assert(id.IsValid(), "Invalid ShadowId passed to ProjectedShadowFeatureProcessor::SetPcfMethod().");
|
||||
ShadowData& shadowData = m_shadowData.GetElement<ShadowDataIndex>(id.GetIndex());
|
||||
shadowData.m_pcfMethod = method;
|
||||
|
||||
@@ -170,6 +171,7 @@ namespace AZ::Render
|
||||
|
||||
void ProjectedShadowFeatureProcessor::SetEsmExponent(ShadowId id, float exponent)
|
||||
{
|
||||
AZ_Assert(id.IsValid(), "Invalid ShadowId passed to ProjectedShadowFeatureProcessor::SetEsmExponent().");
|
||||
ShadowData& shadowData = m_shadowData.GetElement<ShadowDataIndex>(id.GetIndex());
|
||||
shadowData.m_esmExponent = exponent;
|
||||
m_deviceBufferNeedsUpdate = true;
|
||||
|
||||
+4
-5
@@ -180,15 +180,14 @@ namespace AZ
|
||||
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
|
||||
->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows)
|
||||
->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::IsShadowPcfDisabled)
|
||||
->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::IsShadowPcfDisabled)
|
||||
->DataElement(
|
||||
->DataElement(
|
||||
Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_esmExponent, "Esm Exponent",
|
||||
"Exponent used by Esm shadows."
|
||||
"Larger values increase the sharpness of the border between lit and unlit areas.")
|
||||
"Exponent used by Esm shadows. "
|
||||
"Larger values increase the sharpness of the border between lit and unlit areas.")
|
||||
->Attribute(Edit::Attributes::Min, 50.0f)
|
||||
->Attribute(Edit::Attributes::Max, 5000.0f)
|
||||
->Attribute(AZ::Edit::Attributes::Decimals, 0)
|
||||
->Attribute(AZ::Edit::Attributes::SliderCurveMidpoint, 0.05)
|
||||
->Attribute(AZ::Edit::Attributes::SliderCurveMidpoint, 0.05f)
|
||||
->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly)
|
||||
->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows)
|
||||
->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::IsEsmDisabled)
|
||||
|
||||
Reference in New Issue
Block a user