Fill extrusion optimization: face normals on GPU
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Using OES_standard_derivatives we could:
a) Generate face normals on GPU and half the number of vertices sent to GPU for fill extrusions. Approach in Three.js: https://github.com/mrdoob/three.js/blob/master/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.js#L4-L12
b) prototyping idea: using barycentric coordinates (and for vertical and horizontal edges only), combine smooth normals around edges and flat shading in inner part of faces, to achieve smooth edges without introducing additional vertices.
Approach is already verified to work in gl-native.
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 reviewing the Three.js normal_fragment_begin.glsl.js example linked in the issue and the OES_standard_derivatives approach. Compare it with the existing fill-extrusion rendering path and the gl-native prototype mentioned. Done would mean a verified GPU-normal approach that reduces vertices, or a validated barycentric-coordinate approach for smooth edges and flat face interiors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- three.js, typescript
- Domain
- computer-graphics, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100