software-mansion / software-mansion/TypeGPU
Accessors should be allowed to work in "normal" mode
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 122
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 34
Description
Simplest example
const timeAccess = tgpu.accessor(d.f32, 5);
const doubleTime = () => {
// Should access the default value
return timeAccess.$ * 2;
};
// In JS
doubleTime();
Harder example (requires adhoc contexts in normal mode):
const timeAccess = tgpu.accessor(d.f32);
const doubleTime = () => {
return timeAccess.$ * 2;
};
// In JS
tgpu.fn(doubleTime).with(timeAccess, 5)();
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 from the accessor and tgpu.fn().with() entry points shown in the issue, then trace how normal-mode accessors and adhoc contexts are handled. Done means both examples work: an accessor with a default value can be read directly, and an accessor without one can receive a value through .with().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100