I have two big ones Uint8Array
. Sizes: 1024
and2048
I would like to update these arrays in every frame.
An array of length 1024
will fit into a 256 vec4 or 16 * 16 image uniform. But I do not think this is the right way to do this.
How to send large arrays from javascript to GLSL?
Edit
My problem with textures is that to update the image in each frame, I need to copy the data to an object ImageData
. Then I have to draw imageData on the canvas. And after that I should get dataURL on the canvas and change the image src attribute
source
share