Tom Forsyth
· 12w
Is there any reason NOT to use a (nearly) infinite clip plane in D3D? You can just pass something big like 2^80 as the far clip plane into the standard projection generator and it spits out basically ...
Related - thinking about float32 Z buffers, and most implementations are only using the [0,1] range of float32, so we're wasting all that lovely [1,inf] space that float32 can also express!
But then I realised - those two ranges have (approx) the same number of representable values in the float32 encoding.
We're also not using negative numbers, but those seem difficult to map.
So OK, we're only using a quarter of the float32 space - that's still ~30 bits. It's fine. It's fiiiiiiiine.