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

Indirect Draw Call Sample #410

Open
cmhhelgeson opened this issue Mar 28, 2024 · 3 comments
Open

Indirect Draw Call Sample #410

cmhhelgeson opened this issue Mar 28, 2024 · 3 comments
Labels
sample request Request for a new sample

Comments

@cmhhelgeson
Copy link
Contributor

Should there be an example that demonstrates best practices for using indirect draw calls, ala the renderBundles example? Or perhaps indirect draw calls could be an option in a separate sample?

@kainino0x
Copy link
Collaborator

@toji did you have a demo doing some interesting things with indirect draws?

@toji
Copy link
Contributor

toji commented Mar 29, 2024

Yeah, the bundle culling code does use indirect draws, and I talk about their usage in that sample here: https://toji.dev/webgpu-best-practices/render-bundles#indirect-draws (Plus some additional optimization information here: https://toji.dev/webgpu-best-practices/indirect-draws) For what it's worth https://webgpu.github.io/webgpu-samples/?sample=metaballs also uses indirect draws, and is probably a more straightforward use case for them. They're both reasonably complex samples, though, and focused on techniques other than the indirect part.

It may be worthwhile to create a simpler sample focused specifically on indirect draws. It could be as basic as a variant of the spinning cube that uses an indirect draw instead of a traditional one, but that doesn't really touch on the "why" of indirect drawing. A sample with some simple generative geometry (like the metaballs, but ideally even more basic) would serve as a better illustration but it's easy for that to get overly complex fast.

@kainino0x kainino0x added the sample request Request for a new sample label May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sample request Request for a new sample
Projects
None yet
Development

No branches or pull requests

4 participants