Fix and document the depth buffer calculations.

This commit is contained in:
Paul Chote
2021-07-24 21:54:54 +01:00
committed by reaperrr
parent 962d6496bd
commit ef1aee5e95
2 changed files with 22 additions and 15 deletions

View File

@@ -270,8 +270,7 @@ void main()
depth = depth + DepthTextureScale * dot(y, vDepthMask);
}
// Convert to window coords
gl_FragDepth = 0.5 * depth + 0.5;
gl_FragDepth = depth;
if (EnableDepthPreview)
{