mirror of https://github.com/AxioDL/metaforce.git
Frustum culling fix
This commit is contained in:
parent
7a5dff47b7
commit
ef4a07e963
|
@ -576,7 +576,7 @@ void CStateManager::DrawAdditionalFilters() const
|
|||
|
||||
zeus::CFrustum CStateManager::SetupViewForDraw(const SViewport& vp) const
|
||||
{
|
||||
const CGameCamera* cam = static_cast<const CGameCamera*>(x870_cameraManager->GetCurrentCamera(*this));
|
||||
const CGameCamera* cam = x870_cameraManager->GetCurrentCamera(*this);
|
||||
zeus::CTransform camXf = x870_cameraManager->GetCurrentCameraTransform(*this);
|
||||
g_Renderer->SetWorldViewpoint(camXf);
|
||||
CBooModel::SetNewPlayerPositionAndTime(x84c_player->GetTranslation());
|
||||
|
@ -594,7 +594,7 @@ zeus::CFrustum CStateManager::SetupViewForDraw(const SViewport& vp) const
|
|||
zeus::CFrustum frustum;
|
||||
zeus::CProjection proj;
|
||||
proj.setPersp(zeus::SProjPersp{fov, width / height, cam->GetNearClipDistance(), cam->GetFarClipDistance()});
|
||||
frustum.updatePlanes(camXf, proj);
|
||||
frustum.updatePlanes(CGraphics::g_GXModelView, proj);
|
||||
g_Renderer->SetClippingPlanes(frustum);
|
||||
//g_Renderer->PrimColor(zeus::CColor::skWhite);
|
||||
CGraphics::SetModelMatrix(zeus::CTransform::Identity());
|
||||
|
|
|
@ -920,8 +920,8 @@ void CBooRenderer::DrawUnsortedGeometry(int areaIdx, int mask, int targetMask)
|
|||
|
||||
if (!x44_frustumPlanes.aabbFrustumTest(model->x20_aabb))
|
||||
{
|
||||
//model->x40_25_modelVisible = false;
|
||||
//continue;
|
||||
model->x40_25_modelVisible = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (x318_25_drawWireframe)
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit 8873d5245636361079db04a5cc031f775b3ca0cf
|
||||
Subproject commit 2bfe803bf63aa17af34adac7c7b317dc8c646467
|
2
specter
2
specter
|
@ -1 +1 @@
|
|||
Subproject commit 883a7498e1124c12fe65040f76d4079591d7ad60
|
||||
Subproject commit 155d4553794a7428090c453c30dd15e17d0961f0
|
Loading…
Reference in New Issue