;
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.SRGB8_ALPHA8, size, size, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
        gl.framebufferTexture2D(gl.DRAW_FRAMEBUFFER, gl.COLOR_ATTACHMENT2, gl.TEXTURE_2D, tex_srgb1, 0);
        drawbuffers[0] = gl.COLOR_ATTACHMENT0;
        drawbuffers[2] = gl.COLOR_ATTACHMENT2;
    }

    if (drawbuffersFormatMask & linearMask) {
        gl.bindTexture(gl.TEXTURE_2D, tex_linear0);
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA8, size, size, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
 