Fix incorrect culling when drawing actors depth only

This commit is contained in:
2026-09-02 23:08:39 +02:00
parent c3a1312285
commit 280da1702b
6 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -389,7 +389,7 @@ void StaticModel::Draw(RenderContextBatch& renderContextBatch)
ACTOR_GET_WORLD_MATRIX(this, view, world);
Mesh::DrawInfo draw;
draw.DrawModes = _drawModes;
if (drawState && renderContextBatch.Buffers->OcclusionCulling && !renderContextBatch.Buffers->OcclusionCulling->IsVisible(_box, *drawState))
if (drawState && EnumHasAllFlags(renderContext.View.Flags, ViewFlags::OcclusionCulling) && renderContextBatch.Buffers->OcclusionCulling && !renderContextBatch.Buffers->OcclusionCulling->IsVisible(_box, *drawState))
{
// Draw shadows-only (or cull)
draw.DrawModes &= DrawPass::Depth;