You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
The text was updated successfully, but these errors were encountered:
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:The text was updated successfully, but these errors were encountered: