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

Optimize the depth-cloud shader when depth=0 #1729

Merged
merged 4 commits into from Mar 30, 2023

Conversation

emilk
Copy link
Member

@emilk emilk commented Mar 28, 2023

depth=0 is a degenerate case that causes a 1440x1920 depth-map from #1538 take 75ms (!) on my M1 MacBook Pro. With this fix this goes down to 15 ms.

However, if we zoom out a lot, so that the depth point cloud covers a very small part of the screen, the slowness returns.

I suspect this is a GPU binning problem of some sort, where too many points in too small of a screen area causes performance issues. So a proper fix probably needs to involve some sort of LOD:ing. Issue filed: #1730

Checklist

depth=0 is a degenerate case that causes a 1440x1920 depth-map
from #1538 take 75ms (!) on my
M1 MacBook Pro.

With this fix this goes down to 15 ms

However, if we zoom out a lot, so that the depth point cloud covers
a very small part of the screen, the slowness returns.

I suspect this is a GPU binning problem of some sort, where too many
points in too small of a screen area causes performence issues.
@emilk emilk mentioned this pull request Mar 28, 2023
7 tasks
@emilk emilk added 🔺 re_renderer affects re_renderer itself 📉 performance Optimization, memory use, etc labels Mar 28, 2023
crates/re_renderer/shader/depth_cloud.wgsl Outdated Show resolved Hide resolved
@emilk emilk merged commit 82f5d69 into main Mar 30, 2023
17 checks passed
@emilk emilk deleted the emilk/optimize-depth-cloud-shader branch March 30, 2023 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📉 performance Optimization, memory use, etc 🔺 re_renderer affects re_renderer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants