software-mansion / software-mansion/TypeGPU

feat: Matrix homogenize function

Open
#1,328 2 comments 0 reactions 0 assignees View on GitHub

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 homogenize function 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.