Replies: 3 comments
-
Hi! Thanks for the discussion. You are absolutely right, this should work and the issue comes from an oversight in our schema writer compilation. I will create an issue and jump on it right away. We already have the necessary infrastructure in place so it should not take long to get this fixed. In the meantime, if you need a temporary workaround, you can use the vertexBuffer.writePartial(
vertexBufferValues.map((value, idx) => {
return {
idx,
value,
};
}),
); I will keep this discussion updated as we make progress. I also noticed that you use |
Beta Was this translation helpful? Give feedback.
-
Implementation is in review now. Should land in TypeGPU 0.7.0 |
Beta Was this translation helpful? Give feedback.
-
TypeGPU 0.7.0 released yesterday, and along with it, Unstructs and Disarrays should be properly serializable. Thanks for opening the discussion, let us know if you encounter other bugs down the line @ytreu111 🙇♂️ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I just recently started learning WebGPU and I don't understand why I can't use unstruct in vertex buffer
After all, in that case, it would not be necessary to calculate the offset for normalized values each time.
Examples
WGSL
Vanila
How could this work in TypeGPU
Beta Was this translation helpful? Give feedback.
All reactions