mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00

Previously, we submitted polygons as a list of triangles, duplicating some ancillary data with each vertex. As we move away from constant buffers for some of this ancillary data, it will bloat the size of each vertex. To avoid this, we will now instance over a unit triangle instead. Each instance contains three triangle coordinates and ancillary data can be shared between them. The target vertex is computed similarly to how we handle rects in the unit quad shaders.