Open Makogan opened 7 months ago
I thought there was a form of operator overloading via glam? Though, I might be mistaken.
there is no ops module under spirv_std, and none of the examples seem to do this
But there's core::ops
, no? spirv_std
is just a couple of extra stuff - it just complements core
, not replaces it.
Currently, it seems that rustgpu does not support operator overloading (there is no ops module under spirv_std, and none of the examples seem to do this).
This is useful because although linear algebra is the most popular mathematical representation for transformations in computer graphics, it is not the only option.
For example, I currently use projective geometric algebra for skin animations. To do this I need to define a multivector type on the shader that is capable of addition, multiplication, scalar multiplication...
Of course, one can work around the issue by defining methods, but this is less ergonomic than having operators.