This topics not covered well in your great tutorials about webgl. Here example with blending functions: https://www.andersriggelsen.dk/glblendfunc.php