This PR adds Z-based fog. The fog depth is reconstructed from gl_FragCoord in the pixel shader.
The used formula was not compared to actual hardware or against a D3D6 reference renderer.
However, it's "good enough" for now.
Further testing in the future should be done to confirm these formulas.
There are also other methods to reconstruct depth, some of which do eye-relative depth which D3D6 also supports (given a compatible ProjectionMatrix).
An issue about this will be created after merge.
This PR adds Z-based fog. The fog depth is reconstructed from gl_FragCoord in the pixel shader. The used formula was not compared to actual hardware or against a D3D6 reference renderer. However, it's "good enough" for now.
Further testing in the future should be done to confirm these formulas. There are also other methods to reconstruct depth, some of which do eye-relative depth which D3D6 also supports (given a compatible ProjectionMatrix). An issue about this will be created after merge.
More screenshots / comparisons:
Closes #64