Skip to content

Operator Overlaoding support #1149

Open
@Makogan

Description

@Makogan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    t: enhancementA new feature or improvement to an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions