Is it possible to use a mat4x4<f32>
as a uniform data type in WGSL?
I get the following error when doing so:
Shader validation error:
┌─ Shader:18:4
│
18 │ var<uniform> model: mat4x4<f32>;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ naga::GlobalVariable [1]
Global variable [1] 'model' is invalid
Type isn't compatible with the storage class
Wrapping in a struct is fine and achieves what I need, but seems superfluous. Can the matrix type be used directly?
WGSL used to require a struct as the type of a uniform or storage buffer. But WGSL is now more flexible, and (that version of) Naga is not yet caught up.