Closed vorg closed 1 year ago
Revived instancing example and use it to demo attribute.dirty: https://github.com/pex-gl/pex-renderer/commit/13ed4154a4c7bf97fb00f7161f466415ae643022#diff-b9928ed31347ca26a5db354cc663e6275c0a7266edafd38ca237539ca95d2cd0R184-R188
The main change in the system are:
Performance in example (updating offsets/rotations/colors only instead of positions/normals/uvs/cells/offsets/scales/rotations/colors): 10ms -> 3.5ms
We need a way to update only one attribute e.g. offsets without re-uploading all others. One solution would be to add .dirty = true/false property. This could be also used for invalidating bouds and and manually asking for recalculating bounding box.