Closed marv7000 closed 11 months ago
As per glTF specification, the right way to go is this:
you simply upload the buffers to the GPU as is (LogicalBuffers marked for GPU usage in the library), then, BufferViews let you know the ranges where vertices and indices begin and end, and finally, primitives let you know which bufferviews to use for rendering.
In other words, the Buffers, BufferViews and Primitives are designed so you don't do any kind of transformation on the data, you just upload the buffers to the GPU as is and then use the views and the primitives to select the appropiate ranges of the buffers for rendering.
This link might be useful: https://toji.github.io/webgpu-gltf-case-study/
Thanks, marking this as closed.
I feel like an idiot trying to get sequential vertex data (for VAOs) out of a
MeshPrimitive
and write it to aStream
, but I can only get them grouped byAccessor
withMeshPrimitive.GetVertices(string)
. Is there a function I missed or is there no good solution for this?