You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unstructs could be used with raw WGSL vertex functions to generate attributes with proper locations (given every property is decorated with the location attribute).
Structs and Unstructs still need to be separate because buffers created with Unstructs as their schemas can't be used as storage or uniforms - they can be used as local variables tho.
We can assume a default representation for each format (eg. rgba16unorm -> vec4f). Potentially that could allows us to combine it with vertexLayouts to unwrap to appropriate GPUVertexBufferLayout entry and have just one sot (the struct).
This could be a really nice improvement, creating a new point of integration for vanilla WebGPU projects (with unwrapping vertex layouts and resolving an external unstruct with attributes) and for full-TypeGPU projects (reduced duplication, which usually involved creating an unstruct, and its struct counterpart manually).
Unstructs could be used with raw WGSL vertex functions to generate attributes with proper locations (given every property is decorated with the location attribute).
it would resolve to:
Structs and Unstructs still need to be separate because buffers created with Unstructs as their schemas can't be used as storage or uniforms - they can be used as local variables tho.
We can assume a default representation for each format (eg. rgba16unorm -> vec4f). Potentially that could allows us to combine it with
vertexLayouts
to unwrap to appropriateGPUVertexBufferLayout
entry and have just one sot (the struct).The text was updated successfully, but these errors were encountered: