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 depth precision issues on WebGL due to different NDC space #2123

Merged
merged 1 commit into from May 16, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented May 15, 2023

This caused our depth offset based draw order "emulation" to break down on the Web sometimes

Details in the code comments!

Compared objectron on web vs native to validate that picking depth still works correctly - luckily we don't blindly assume how our projection matrix is formed anywhere in the code it seems, phew!

Web before:
image

Web after:
image

What

Checklist

PR Build Summary: https://build.rerun.io/pr/2123

This caused our depth offset based draw order "emulation" to break down on the Web sometimes
@Wumpf Wumpf added 🪳 bug Something isn't working 🔺 re_renderer affects re_renderer itself labels May 15, 2023
@teh-cmc teh-cmc self-requested a review May 16, 2023 06:45
Copy link
Member

@teh-cmc teh-cmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the detailed explanations

@Wumpf Wumpf merged commit 4f60fd7 into main May 16, 2023
17 checks passed
@Wumpf Wumpf deleted the andreas/fix-webgl-depth-precision-issues branch May 16, 2023 07:08
Wumpf added a commit that referenced this pull request May 17, 2023
emilk pushed a commit that referenced this pull request May 22, 2023
Wumpf added a commit that referenced this pull request May 22, 2023
…ll 3D scenes (#2170)

* Revert "Fix depth precision issues on WebGL due to different NDC space (#2123)"

This reverts commit 4f60fd7.

* fudge depth offsets on Webgl

* hardware_tier global constant, better depth handling for gles

* Improve the depth offset for all platforms

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
emilk added a commit that referenced this pull request May 25, 2023
…ll 3D scenes (#2170)

* Revert "Fix depth precision issues on WebGL due to different NDC space (#2123)"

This reverts commit 4f60fd7.

* fudge depth offsets on Webgl

* hardware_tier global constant, better depth handling for gles

* Improve the depth offset for all platforms

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working 🔺 re_renderer affects re_renderer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants