[ATOM-15926] Fixing light delegates which were always calculating the attenuation radius automatically for their debug display instead of respecting the user-set attenuation radius. (#1732)
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
This commit is contained in:
+1
-1
@@ -69,7 +69,7 @@ namespace AZ
|
||||
if (isSelected)
|
||||
{
|
||||
// Attenuation radius shape is just a capsule with the same internal height, but a radius of the attenuation radius.
|
||||
float radius = CalculateAttenuationRadius(AreaLightComponentConfig::CutoffIntensity);
|
||||
float radius = GetConfig()->m_attenuationRadius;
|
||||
|
||||
// Add on the caps for the attenuation radius
|
||||
float scale = GetTransform().GetUniformScale();
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ namespace AZ
|
||||
debugDisplay.SetColor(color);
|
||||
|
||||
// Draw a Polygon for the attenuation radius
|
||||
debugDisplay.DrawWireSphere(transform.GetTranslation(), CalculateAttenuationRadius(AreaLightComponentConfig::CutoffIntensity));
|
||||
debugDisplay.DrawWireSphere(transform.GetTranslation(), GetConfig()->m_attenuationRadius);
|
||||
debugDisplay.DrawArrow(transform.GetTranslation(), transform.GetTranslation() + transform.GetBasisZ());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace AZ
|
||||
debugDisplay.SetColor(color);
|
||||
|
||||
// Draw a quad for the attenuation radius
|
||||
debugDisplay.DrawWireSphere(transform.GetTranslation(), CalculateAttenuationRadius(AreaLightComponentConfig::CutoffIntensity));
|
||||
debugDisplay.DrawWireSphere(transform.GetTranslation(), GetConfig()->m_attenuationRadius);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -48,9 +48,9 @@ namespace AZ
|
||||
if (isSelected)
|
||||
{
|
||||
debugDisplay.SetColor(color);
|
||||
|
||||
|
||||
// Draw a sphere for the attenuation radius
|
||||
debugDisplay.DrawWireSphere(transform.GetTranslation(), CalculateAttenuationRadius(AreaLightComponentConfig::CutoffIntensity));
|
||||
debugDisplay.DrawWireSphere(transform.GetTranslation(), GetConfig()->m_attenuationRadius);
|
||||
}
|
||||
}
|
||||
} // namespace Render
|
||||
|
||||
+2
-2
@@ -53,9 +53,9 @@ namespace AZ
|
||||
if (isSelected)
|
||||
{
|
||||
debugDisplay.SetColor(color);
|
||||
|
||||
|
||||
// Draw a sphere for the attenuation radius
|
||||
debugDisplay.DrawWireSphere(transform.GetTranslation(), CalculateAttenuationRadius(AreaLightComponentConfig::CutoffIntensity));
|
||||
debugDisplay.DrawWireSphere(transform.GetTranslation(), GetConfig()->m_attenuationRadius);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user