run(system, input, output, clear)
    {
        this.values.uStrength = (1 / output.size.x) * (output.size.x / input.size.y);
        this.values.uStrength *= Math.abs(this.strength);
        this.values.uStrength /= this.numPasses;

        if (this.numPasses === 1)
        {
            system.drawFilter(this, input, output, clear);
        }
        else
        {
            const renderTarget = FilterUtils.getRenderTarget(this.renderer.gl);
            let flip = input;
            let flop = renderTarget;

            for (let i = 0; i < this.numPasses - 1; ++i)
            {
                system.drawFilter(this, flip, flop, true);

                const t = flip;

                flip = flop;
                flop = t;
            }

            system.drawFilter(this, flip, output, clear);
            FilterUtils.freeRenderTarget(renderTarget);
        }
    }
/**
     * Runs the filter, performing the post-processing passes the filter defines.
     *
     * @param {FilterRenderSystem} system - The render system.
     * @param {RenderTarget} input - The render target to use as input.
     * @param {RenderTarget} output - The render target to use as output.
     * @param {boolean} clear - Should the output buffer be cleared before use?
     */
Runs the filter, performing the post-processing passes the filter defines.
@param {FilterRenderSystem} system - The render system.
@param {RenderTarget} input - The render target to use as input.
@param {RenderTarget} output - The render target to use as output.
Runs the filter performing the post - processing passes the filter defines . @param { FilterRenderSystem } system - The render system . @param { RenderTarget } input - The render target to use as input . @param { RenderTarget } output - The render target to use as output .
run(system, input, output, clear)
    {
        this.values.uStrength = (1 / output.size.x) * (output.size.x / input.size.y);
        this.values.uStrength *= Math.abs(this.strength);
        this.values.uStrength /= this.numPasses;
        if (this.numPasses === 1)
        {
            system.drawFilter(this, input, output, clear);
        }
        else
        {
            const renderTarget = FilterUtils.getRenderTarget(this.renderer.gl);
            let flip = input;
            let flop = renderTarget;
            for (let i = 0; i < this.numPasses - 1; ++i)
            {
                system.drawFilter(this, flip, flop, true);
                const t = flip;
                flip = flop;
                flop = t;
            }
            system.drawFilter(this, flip, output, clear);
            FilterUtils.freeRenderTarget(renderTarget);
        }
    }
run ( system , input , output , clear ) { this . values . uStrength = ( 1 / output . size . x ) * ( output . size . x / input . size . y ) ; this . values . uStrength *= Math . abs ( this . strength ) ; this . values . uStrength /= this . numPasses ; if ( this . numPasses === 1 ) { system . drawFilter ( this , input , output , clear ) ; } else { const renderTarget = FilterUtils . getRenderTarget ( this . renderer . gl ) ; let flip = input ; let flop = renderTarget ; for ( let i = 0 ; i < this . numPasses - 1 ; ++ i ) { system . drawFilter ( this , flip , flop , true ) ; const t = flip ; flip = flop ; flop = t ; } system . drawFilter ( this , flip , output , clear ) ; FilterUtils . freeRenderTarget ( renderTarget ) ; } }
Runs the filter, performing the post-processing passes the filter defines.
Runs the filter performing the post - processing passes the filter defines .