-
Notifications
You must be signed in to change notification settings - Fork 309
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
Comments
@toji did you have a demo doing some interesting things with indirect draws? |
AFAIK this sample https://webgpu.github.io/webgpu-samples/?sample=bundleCulling uses indirect draw calls. |
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. |
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?
The text was updated successfully, but these errors were encountered: