Add light debug view flag to draw light shapes

This commit is contained in:
Chandler Cox
2023-07-07 17:32:46 -05:00
parent ca5cbf05be
commit a0bb3f2995
10 changed files with 89 additions and 0 deletions

View File

@@ -143,6 +143,16 @@ void PointLight::OnDebugDrawSelected()
LightWithShadow::OnDebugDrawSelected();
}
void PointLight::DrawLightsDebug(RenderView& view)
{
const BoundingSphere sphere(_sphere.Center - view.Origin, _sphere.Radius);
if (!view.CullingFrustum.Intersects(sphere))
return;
// Draw influence range
DEBUG_DRAW_WIRE_SPHERE(_sphere, Color::Yellow, 0, true);
}
#endif
void PointLight::OnLayerChanged()