mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
OGL: Remove support for NV_depth_buffer_float.
We can't clamp the depth values to the 24-bit range while this extension is active.
This commit is contained in:
@ -933,25 +933,15 @@ bool Renderer::UseVertexDepthRange() const
|
||||
if (!g_ActiveConfig.backend_info.bSupportsDepthClamp)
|
||||
return false;
|
||||
|
||||
const bool ztexture_enabled = bpmem.ztex2.type != ZTEXTURE_DISABLE && !bpmem.zcontrol.early_ztest;
|
||||
// We need a full depth range if a ztexture is used.
|
||||
if (bpmem.ztex2.type != ZTEXTURE_DISABLE && !bpmem.zcontrol.early_ztest)
|
||||
return true;
|
||||
|
||||
if (g_ActiveConfig.backend_info.bSupportsOversizedDepthRanges)
|
||||
{
|
||||
// We support oversized depth ranges, but we need a full depth range if a ztexture is used.
|
||||
return ztexture_enabled;
|
||||
}
|
||||
else
|
||||
{
|
||||
// We need a full depth range if a ztexture is used.
|
||||
if (ztexture_enabled)
|
||||
return true;
|
||||
// If an inverted depth range is unsupported, we also need to check if the range is inverted.
|
||||
if (!g_ActiveConfig.backend_info.bSupportsReversedDepthRange && xfmem.viewport.zRange < 0.0f)
|
||||
return true;
|
||||
|
||||
// If an inverted depth range is unsupported, we also need to check if the range is inverted.
|
||||
if (!g_ActiveConfig.backend_info.bSupportsReversedDepthRange && xfmem.viewport.zRange < 0.0f)
|
||||
return true;
|
||||
|
||||
// If an oversized depth range or a ztexture is used, we need to calculate the depth range
|
||||
// in the vertex shader.
|
||||
return fabs(xfmem.viewport.zRange) > 16777215.0f || fabs(xfmem.viewport.farZ) > 16777215.0f;
|
||||
}
|
||||
// If an oversized depth range or a ztexture is used, we need to calculate the depth range
|
||||
// in the vertex shader.
|
||||
return fabs(xfmem.viewport.zRange) > 16777215.0f || fabs(xfmem.viewport.farZ) > 16777215.0f;
|
||||
}
|
||||
|
Reference in New Issue
Block a user