Greetings to everyone,
I’ve been struggling a lot to copy a VideoTexture into a DataTexture.
I will do my best to explain what I want so here we go:
I have a video element that I want to use it for two things at the same time :
1 - as the renderer background texture
2 - extract a resized pixels(arraybuffer) from the frame for post processing
3 - the scene’s background texture and the resized pixels must always come from the same frame
I could use two canvases. One to draw a frame, use with DataTexture for the background then draw the first canvas into the small one to get the resized pixels to draw the video.
but this solution doesn’t work for me, it is too slow, manipulating 2 canvases and retrieving pixels from them really drop the fps.
Now am looking for any solution that doesn’t include canvas
So the idea is to have a videoTexture and store frame texture(maybe a DataTexture) then somehow use this frame texture for my scene background and also for a renderTarget background at the same time