Repository: pixijs/pixijs
File: src/filters/FilterSystem.ts (TypeScript)

Code before:
        // next we get the settings for the filter
        // we need to find the LOWEST resolution for the filter list
        let resolution = Infinity;
        // Padding is additive to add padding to our padding
        let padding = 0;
        // if this is true for any filter, it should be true
        let antialias = false;
        // true if any filter requires the previous render target
        let blendRequired = false;
        // true if any filter in the list is enabled
        let enabled = false;

        for (let i = 0; i < filters.length; i++)
        {
            const filter = filters[i];

            resolution = Math.min(resolution, filter.resolution ?? colorTextureSource._resolution);
            padding += filter.padding;

            if (filter.antialias === 'on')
            {
                antialias = true;
            }
            else if (filter.antialias === 'inherit')
            {
                antialias ||= colorTextureSource.antialias;
            }

            const isCompatible = !!(filter.compatibleRenderers & renderer.type);

            if (!isCompatible)
            {
                enabled = false;
                break;
            }

            if (filter.blendRequired && !((renderer as WebGLRenderer).backBuffer?.useBackBuffer ?? true))
            {
                // #if _DEBUG
                // eslint-disable-next-line max-len
                warn('Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options.');
                // #endif

                enabled = false;
                break;
            }

            enabled = filter.enabled || enabled;
            blendRequired = blendRequired || filter.blendRequired;
        }


Review comment (suggestion):
The comment of `antialias` says:
> if this is true for any filter, it should be true

The previous logic didn't match the comment. Fixed that.

Code after:
        // next we get the settings for the filter
        // we need to find the LOWEST resolution for the filter list
        let resolution = Infinity;
        // Padding is additive to add padding to our padding
        let padding = 0;
        // if this is true for all filter, it should be true, and otherwise false
        let antialias = true;
        // true if any filter requires the previous render target
        let blendRequired = false;
        // true if any filter in the list is enabled
        let enabled = false;

        for (let i = 0; i < filters.length; i++)
        {
            const filter = filters[i];

            resolution = Math.min(resolution, filter.resolution === 'inherit'
                ? colorTextureSource._resolution : filter.resolution);
            padding += filter.padding;

            if (filter.antialias === 'off')
            {
                antialias = false;
            }
            else if (filter.antialias === 'inherit')
            {
                antialias &&= colorTextureSource.antialias;
            }

            const isCompatible = !!(filter.compatibleRenderers & renderer.type);

            if (!isCompatible)
            {
                enabled = false;
                break;
            }

            if (filter.blendRequired && !((renderer as WebGLRenderer).backBuffer?.useBackBuffer ?? true))
            {
                // #if _DEBUG
                // eslint-disable-next-line max-len
                warn('Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options.');
                // #endif

                enabled = false;
                break;
            }

            enabled = filter.enabled || enabled;
            blendRequired = blendRequired || filter.blendRequired;
        }