Add culling and render mask check for models rendered via Custom Actors list

This commit is contained in:
Wojtek Figat
2021-07-16 17:13:44 +02:00
parent dcd4a41f7d
commit 4d136af7dd
3 changed files with 16 additions and 7 deletions

View File

@@ -268,7 +268,10 @@ void StaticModel::Draw(RenderContext& renderContext)
void StaticModel::DrawGeneric(RenderContext& renderContext)
{
Draw(renderContext);
if (renderContext.View.RenderLayersMask.Mask & GetLayerMask() && renderContext.View.CullingFrustum.Intersects(_box))
{
Draw(renderContext);
}
}
bool StaticModel::IntersectsItself(const Ray& ray, float& distance, Vector3& normal)