reprocessing
reprocessing copied to clipboard
Use some arcane magic to pack the vertex data more tightly
Right now we are transforming our RGBA colors to floats and sending those to the GPU. That's a total of 16 bytes, but the precision of the colors based on the API is really just 0 to 255, so we should be able to only use 4 bytes instead.
To do that we'd have to write some C code to cast the bigarray to an array of char and set the rgba.
In JS we should be able to call setUInt8 (something like this https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/setInt8).