Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operator Overlaoding support #1149

Open
Makogan opened this issue May 1, 2024 · 2 comments
Open

Operator Overlaoding support #1149

Makogan opened this issue May 1, 2024 · 2 comments
Labels
t: enhancement A new feature or improvement to an existing one.

Comments

@Makogan
Copy link

Makogan commented May 1, 2024

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.

@Makogan Makogan added the t: enhancement A new feature or improvement to an existing one. label May 1, 2024
@FishArmy100
Copy link

I thought there was a form of operator overloading via glam? Though, I might be mistaken.

@Patryk27
Copy link

Patryk27 commented May 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: enhancement A new feature or improvement to an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants