Add frustum culling (WIP)

This commit is contained in:
Jérôme Leclercq
2021-08-19 23:26:34 +02:00
parent 8db8533300
commit 8546631f62
15 changed files with 643 additions and 463 deletions

View File

@@ -211,11 +211,11 @@ int main()
}
planeMat->AddPass("ForwardPass", planeMatPass);
Nz::Model spaceshipModel(std::move(gfxMesh));
Nz::Model spaceshipModel(std::move(gfxMesh), spaceship->GetAABB());
for (std::size_t i = 0; i < spaceshipModel.GetSubMeshCount(); ++i)
spaceshipModel.SetMaterial(i, spaceshipMat);
Nz::Model planeModel(std::move(planeMeshGfx));
Nz::Model planeModel(std::move(planeMeshGfx), planeMesh->GetAABB());
for (std::size_t i = 0; i < planeModel.GetSubMeshCount(); ++i)
planeModel.SetMaterial(i, planeMat);