Add ObjectRadius to DrawCall to properly cull local lights and env probes in Forward Shading

This commit is contained in:
Wojtek Figat
2023-09-20 15:01:02 +02:00
parent 8bd6649510
commit 8cd8ae93c3
12 changed files with 29 additions and 8 deletions

View File

@@ -366,6 +366,7 @@ void TextRender::Draw(RenderContext& renderContext)
DrawCall drawCall;
drawCall.World = world;
drawCall.ObjectPosition = drawCall.World.GetTranslation();
drawCall.ObjectRadius = _sphere.Radius;
drawCall.Surface.GeometrySize = _localBox.GetSize();
drawCall.Surface.PrevWorld = _drawState.PrevWorld;
drawCall.Surface.Lightmap = nullptr;