software-mansion / software-mansion/TypeGPU
feat: Matrix homogenize function
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 122
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 34
Description
After #1319 is merged:
- find a way to implement
homogenizefunction that takes a matrix and returns a matrix of bigger size:
const matrix = d.mat3x3f(1, 2, 3, 4, 5, 6, 7, 8, 9);
expect(homogenize(matrix)).toStrictEqual(
d.mat4x4f(1, 2, 3, 0, 4, 5, 6, 0, 7, 8, 9, 0, 0, 0, 0, 1),
);
(keep in mind that we do not want to repeat the matrix wgsl snippet 9 times),
- change matrix interface to allow creation of 3x3 transformations (other than translation), and refactor 4x4 transformations to use the new code with homogenize.
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
After #1319 is merged, inspect the matrix interface and existing 4x4 transformation code. Define how homogenize expands a 3x3 matrix without repeating the WGSL snippet, then verify that 3x3 transformations can be created and 4x4 transformations use the shared path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100