[Migrated] Operator Overlaoding support
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.4k
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/1149
Old labels: t: enhancement
Originally creatd by Makogan on 2024-05-01T21:25:10Z
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the spirv_std area, especially the reported absence of an ops module, and compare the existing examples for operator usage. Done would mean custom shader types can use operators such as addition, multiplication, and scalar multiplication rather than requiring method-based workarounds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100