lass PreProcessor
    {
        constructor( canvas )
        {
            const gl = canvas.getContext( 'webgl2', { antialias: true } );

            if( !gl )
            {
                throw new Error( 'WebGL 2.0 is not supported on this machine.' );
            }

            // enables writing float textures to frame buffer if not enabled by default
            if( !gl.getExtension( 'EXT_color_buffer_float' ) )
            {
                throw new Error( 'Floating point textures not supported on