I'm trying to make something like cycles engine in browser using WebGL and custom shader. I'm using gl.drawArrays function to update current frame. Although I need to overlay one frame on another to get let noisy picture (if possible, get average of previous pixel render and current one). I tried so many ways but still didn't find a solution. Maybe anyone knows the answer?