Replies: 1 comment 1 reply
-
Hey! I think using a custom implementation of the If all the elements of your uniform buffer are supposed to have the same type, you can enable the |
Beta Was this translation helpful? Give feedback.
-
Hey! I think using a custom implementation of the If all the elements of your uniform buffer are supposed to have the same type, you can enable the |
Beta Was this translation helpful? Give feedback.
-
Hello @sebcrozet !
Incredible work on this project. I hope you're doing well 😄
I am working on a new version of the open source SmartShape Engine written 100% in Rust using wgpu.
WebGPU has uniform buffers: the goal is to avoid many calls to
glUniform()
with a single call to set a uniform buffer. I would like to take it one step further.I would like my Rust code to do math on Vector and Matrices that are allocated in a uniform buffer. Presumably a
Vec<u8>
or[u8]
. The goal is to make sure the underlying memory for a specific set of Vector/Matrices is a contiguous buffer than can directly be used as a uniform buffer without copy.I have read the Computer-graphics recipes already. But the difference is it relies on copying the Vector/Matrix data to the uniform buffer.
My first take would be that I would need to implement a custom allocator for static
SVector
andSMatrix
. Am I going in the right direction? Does it even make sense?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions