Hacker News new | ask | show | jobs
by daeken 4761 days ago
It is actually slightly more complicated. The existing effects work in GLSL and are just transforming single frames of video. For that effect to work, you need the previous buffer states; this means that seeking will cause the image to be different, and you need to feed the previous render state back as a texture.
1 comments

Just draw the frames to a 2D canvas, without clearing it, then back to the background buffer.
You still need to remove the green-screen. This either means an expensive process on the CPU side, or pushing the frame to the GPU to remove it with a shader and then using RTT and rendering that or reading the framebuffer and drawing that to a canvas. Note, it's really not difficult to do this, it's just slightly more complex than the other effects, is all.
The demo is already removing the green-screen, I don't think that's the most expensive part.
Well no, the demo is removing the green screen but only in the shaders. As I said, this really isn't a big deal, but it does add complexity.