I'm using Node.js. I have a bitmap in a Buffer in such form [R,G,B,A,R,G,B,A,...].
I'm confused how to pass each pixel (R,G,B,A) instead of individual colors to gpu.js. Documentation explains how to do it with img/video browser elements, but not for raw image data.
Edit: I want to get output in the same order [R,G,B,A, ...], not in a canvas or something else, but as an array/buffer.
I'm using Node.js. I have a bitmap in a Buffer in such form [R,G,B,A,R,G,B,A,...].
I'm confused how to pass each pixel (R,G,B,A) instead of individual colors to gpu.js. Documentation explains how to do it with img/video browser elements, but not for raw image data.
Edit: I want to get output in the same order [R,G,B,A, ...], not in a canvas or something else, but as an array/buffer.