Open
Description
Hey, thank you for sharing this code, it's a big help.
I noticed that if you reverse the order that you're storing bytes in encode_float
, (e.g., wzyx isntead of xyzw) then you can use the results from readPixels directly, like so:
buffer = new ArrayBuffer(width * height * 4);
floats = new Float32Array(buffer);
bytes = new Uint8Array(buffer);
gl.readPixels(0, 0, width, height, gl.RGBA, gl.UNSIGNED_BYTE, bytes);
Metadata
Metadata
Assignees
Labels
No labels