private bool CullEntityByPortals(idRenderEntity entity, PortalStack portalStack)
{
if(idE.CvarSystem.GetBool("r_useEntityCulling") == false)
{
return false;
}
// try to cull the entire thing using the reference bounds.
// we do not yet do callbacks or dynamic model creation,
// because we want to do all touching of the model after
// we have determined all the lights that may effect it,
// which optimizes cache usage
return idHelper.CullLocalBox(entity.ReferenceBounds, entity.ModelMatrix, portalStack.PortalPlaneCount, portalStack.PortalPlanes);
}