Why is VertexFormat not passable as usize ? #3341
erwanvivien
started this conversation in
General
Replies: 1 comment 3 replies
-
The graphics APIs used by wgpu's backends require the vertex attribute formats to be provided, so wgpu/WebGPU also require it (these can't always be derived from the shader later when the pipeline is used). To pass a matrix you can use multiple vertex attribute locations. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When using a VertexBufferLayout, we are forced to use
VertexFormat
, why can't we pass an abitrary number of bytes and let the shader take it as is ?Wouldn't this be possible and portable ?
Edit:
The usecase being passing a Mat4x4 (to wgsl)
Beta Was this translation helpful? Give feedback.
All reactions