mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 23:47:43 +00:00
HUD rendering bug fixes
This commit is contained in:
@@ -587,7 +587,7 @@ zeus::CFrustum CStateManager::SetupViewForDraw(const SViewport& vp) const
|
||||
int vpLeft = (vp.x8_width - vpWidth) / 2 + vp.x0_left;
|
||||
int vpTop = (vp.xc_height - vpHeight) / 2 + vp.x4_top;
|
||||
g_Renderer->SetViewport(vpLeft, vpTop, vpWidth, vpHeight);
|
||||
CGraphics::SetDepthRange(0.125f, 1.f);
|
||||
CGraphics::SetDepthRange(DEPTH_WORLD, DEPTH_FAR);
|
||||
float fov = std::atan(std::tan(zeus::degToRad(cam->GetFov()) * 0.5f) * xf2c_viewportScale.y * 2.f);
|
||||
float width = xf2c_viewportScale.x * vp.x8_width;
|
||||
float height = xf2c_viewportScale.y * vp.xc_height;
|
||||
@@ -786,12 +786,12 @@ void CStateManager::DrawWorld() const
|
||||
{
|
||||
if (x86c_stateManagerContainer->xf39c_renderLast.size())
|
||||
{
|
||||
CGraphics::SetDepthRange(0.015625f, 0.03125f);
|
||||
CGraphics::SetDepthRange(DEPTH_SCREEN_ACTORS, DEPTH_GUN);
|
||||
for (TUniqueId id : x86c_stateManagerContainer->xf39c_renderLast)
|
||||
if (const CActor* actor = static_cast<const CActor*>(GetObjectById(id)))
|
||||
if (actor->xe6_27_renderVisorFlags & 0x1)
|
||||
actor->Render(*this);
|
||||
CGraphics::SetDepthRange(0.125f, 1.f);
|
||||
CGraphics::SetDepthRange(DEPTH_WORLD, DEPTH_FAR);
|
||||
}
|
||||
g_Renderer->DoThermalBlendCold();
|
||||
|
||||
@@ -857,12 +857,12 @@ void CStateManager::DrawWorld() const
|
||||
|
||||
if (x86c_stateManagerContainer->xf39c_renderLast.size())
|
||||
{
|
||||
CGraphics::SetDepthRange(0.015625f, 0.03125f);
|
||||
CGraphics::SetDepthRange(DEPTH_SCREEN_ACTORS, DEPTH_GUN);
|
||||
for (TUniqueId id : x86c_stateManagerContainer->xf39c_renderLast)
|
||||
if (const CActor* actor = static_cast<const CActor*>(GetObjectById(id)))
|
||||
if (actor->xe6_27_renderVisorFlags & 0x2)
|
||||
actor->Render(*this);
|
||||
CGraphics::SetDepthRange(0.125f, 1.f);
|
||||
CGraphics::SetDepthRange(DEPTH_WORLD, DEPTH_FAR);
|
||||
}
|
||||
|
||||
if (thermal)
|
||||
|
||||
Reference in New Issue
Block a user