-
There are multi_draw_* methods on RenderPass (https://docs.rs/wgpu/latest/wgpu/struct.RenderPass.html#method.multi_draw_indirect), but it seems like Naga doesn't support draw_id builtin for that (https://docs.rs/naga/latest/naga/enum.BuiltIn.html) So the question is - how can I access index of draw call inside vertex shader when using multi_draw_* methods like in OpenGL and Vulkan? |
Beta Was this translation helpful? Give feedback.
Answered by
Bromles
Jul 20, 2024
Replies: 1 comment
-
Was answered in wgpu matrix channel. Currently, there is no way to use draw_id, because DX12 only just got support for it. There is a way to emulate this with compute, but it's non-trivial |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Bromles
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Was answered in wgpu matrix channel.
Currently, there is no way to use draw_id, because DX12 only just got support for it. There is a way to emulate this with compute, but it's non-trivial