Bug: Depth Bias outputs NaNs

Hi,

When rendering to the depth buffer with Depth Bias enabled to pull geometry towards the camera, I’m seeing NaNs being output to the depth buffer for large triangles that are visible on screen but also clipped far outside the camera frustum.

I have been able to reproduce this issue on Windows with DirectX11 on a RTX2080 GPU with driver version 441.08. The problem is NOT present when using a WARP software renderer.

The problem is also not reproducible on Ubuntu 20.04 with OpenGL on a RTX2080 with driver version 450.102.04.

The problem triangles are the black ones on the right in the following image:

1 Like

I have the same issue with DirectX11 Win10 RTX 2070 Super and driver version 465.89. I have the same commands running on Radeon, XBOX and Nvidia. I have depth = 1 and with bias = -1677 (slope-scaled bias is 0). Radeon and XBOX are giving me correct value slightly less than 1. Nvidia gives huge negaive values (about -10^11). Looks like this is happening only with bias for floating-point depth buffer (in my case - with DXGI_FORMAT_D32_FLOAT_S8X24_UINT, but not with DXGI_FORMAT_D24_UNORM_S8_UINT).

Just another quick update: This bug is also not present in OpenGL on Windows. It’s DirectX (DX11 at least) specific.