Use ANGLE_instanced_arrays extension to reduce buffer sizes for layers with property functions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
According to [this presentation about WebGL2](https://docs.google.com/presentation/d/1Orx0GB0cQcYhHkYsaEcoo5js3c5-pv7ahPniIRIzzfg), this feature (available for WebGL 1.0 as extension) can lead to significant performance gains. Interesting bit:
> Google Maps uses and requires instancing support — Reduces vertex buffer size by 6x (!)
The concept is:
> To draw 1000 soldiers
> 1000 draw calls, with different position, posture, etc
> Or, with instancing, only 1 draw call
> Big perf improvement
cc @ansis @kkaefer @jfirebaugh @lucaswoj what do you think? Can we use it?
Also related: https://github.com/mapbox/mapbox-gl-js/issues/1361 (mentioned in the slides as a notable perf feature too)
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 reading the ANGLE_instanced_arrays specification and the related mapbox-gl-js issue 1361. Then locate the WebGL rendering paths for layers with property functions and determine whether instancing is supported by the project’s target contexts. Done would require an agreed implementation scope, measurable buffer or draw-call improvements, and coverage for supported and unsupported contexts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- computer-graphics, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100