Skip to content

Someday: use a 32-bit depth buffer #6

Description

@sjackso

Athena up to v0.3.5 shows bad z-fighting artifacts in its ray-traced output objects (cylinders, spheres, cones). v0.3.6 and later address this by choosing a better front plane for perspective projection.

What I really want to do, to address this more completely, is to change Athena's depth buffer to 32 bits instead of 24. Unfortunately this does not seem to be possible with today's PySide2 and Qt3D, because:

  • Qt3DWindow.cpp unconditionally sets a 24 bit depth buffer, and
  • It doesn't seem possible to set up a new OpenGL context in a child class, and
  • It doesn't seem possible to control the actual buffer depth by first enabling shared OpenGL contexts (I tried), and
  • Reimplementing Qt3DWindow in Python code is impossible because of a PySide2 bug. (Maybe it'd be possible under PyQt5?)

Once a 32-bit buffer can be enabled, it would be worthwhile to reverse the Z buffer per this article to gain a complete upper hand over these kind of rendering artifacts.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions