Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix z-buffer depth calculations #5

Open
4 tasks
jsocol opened this issue Aug 14, 2021 · 0 comments
Open
4 tasks

Fix z-buffer depth calculations #5

jsocol opened this issue Aug 14, 2021 · 0 comments
Labels
Milestone

Comments

@jsocol
Copy link
Owner

jsocol commented Aug 14, 2021

At certain angles sometimes this is simply wrong, and objects that should be in the foreground are not. I'm not sure if this has to do with floating point rounding issues, or there are actually incorrect calculations or comparisons in there. It tends to happen with objects at similar or overlapping depth (see the central ring and the moving color triangle), and I haven't seen as much of an issue when objects are separated in z-space. That leads me to believe the calculated z values are too close together.

  • Make sure this is using the right z coordinate, first of all, and doing so consistently. It isn't intended to be a w-buffer.
  • It may be an issue with the relative scale of the space and the current far-plane depth in the camera?
  • Consider if a w-buffer would work better.
  • Double check, while in here, that the w-coordinate in view space is correct. It doesn't seem to be quite right to me.
@jsocol jsocol added this to the v1 milestone Aug 14, 2021
@jsocol jsocol added the bug label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant