d!");
    }

    // deinit
    gl.bindTexture(gl.TEXTURE_2D, null);
    gl.bindFramebuffer(gl.READ_FRAMEBUFFER, null);
    gl.bindFramebuffer(gl.DRAW_FRAMEBUFFER, null);
    gl.deleteTexture(tex_srgb0);
    gl.deleteTexture(tex_linear0);
    gl.deleteTexture(tex_srgb1);
    gl.deleteTexture(tex_linear1);
    gl.deleteTexture(tex_read);
    gl.deleteFramebuffer(fbo_read);
    gl.deleteFramebuffer(fbo_draw);
}

function checkPixel(color, expectedColor) {
  var tolerance = 3;
  return (Math.abs(color[0] - expe