Vulkan: Add support for unrestricted depth range.

This commit is contained in:
CrossVR
2025-07-21 05:48:04 +09:00
parent dccd8709d8
commit 0ace5f5d3d
6 changed files with 35 additions and 10 deletions

View File

@ -131,6 +131,11 @@ void VertexShaderManager::SetProjectionMatrix(XFStateManager& xf_state_manager)
bool VertexShaderManager::UseVertexDepthRange()
{
// Backend has full support for unrestricted depth ranges including the ability to clamp the
// final depth value to MAX_EFB_DEPTH.
if (g_backend_info.bSupportsUnrestrictedDepthRange)
return false;
// We can't compute the depth range in the vertex shader if we don't support depth clamp.
if (!g_backend_info.bSupportsDepthClamp)
return false;