software-mansion / software-mansion/TypeGPU
impr: Auto `@interpolate(flat)` when integer field encountered in varyings struct
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 122
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 34
Description
For example, when we define vertex output struct like the following
const ModelVertexOutput = {
worldPosition: d.vec3f,
worldNormal: d.vec3f,
applySeaFog: d.u32,
};
We will get the error, that integer fields must be marked with explicit @interpolate(flat)
I think, it won't be harmful to do it automatically for integer types.
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 with the TypeScript varying-struct handling illustrated by the ModelVertexOutput example, focusing on the integer applySeaFog field and the validation that currently requires explicit @interpolate(flat). The work is complete when integer fields automatically receive flat interpolation without requiring the annotation, while the existing example no longer produces the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100