jsocol / jsocol/indirect3d

Fix z-buffer depth calculations

Open
#5 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the z-buffer depth calculations, camera far-plane handling, and view-space w-coordinate logic; no file or test is named in the issue. Reproduce the central ring and moving color triangle case, then verify that foreground objects render consistently using the intended z coordinate rather than a w-buffer.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.