Skip to content

Use a Reverse-Z depth buffer by default #2324

@jellysquid3

Description

@jellysquid3

Currently, Minecraft suffers from slight depth buffer precision issues even with a render distance of 32 chunks, and these issues are exacerbated when using any kind of zooming or spy-glass like functionality. For mods like Nvidium, the problem is even more extreme due to the dramatically increased render distance.

This is because OpenGL is rather funny and uses clip-space of [-1, +1], which has historically been a problem. The ARB_clip_control extension (merged in OpenGL 4.5 Core) provides a way to re-configure the clip-space to something more reasonable, like [0, 1].

Open questions:

  • How does this affect Z-fighting with blocks such as Iron Bars? Maybe it could help. It does not.
  • Are other mods going to break if we enable it by default?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions