Switch from Float32
to Uint16
for encoding colors in buffers
#10587
Labels
performance ⚡
Speed, stability, CPU usage, memory usage, or power usage
Currently we use a pair of
Float32
values to represent a color value in WebGL buffers:mapbox-gl-js/src/data/program_configuration.js
Lines 169 to 170 in 4eeefae
Using a pair of
Uint16
instead should be enough precision while cutting the amount of data necessary to represent data-driven color properties in half, which might be a nice low hanging fruit to optimize performance in styles that extensively use data-driven colors (such as Mapbox core styles).The text was updated successfully, but these errors were encountered: