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

Code before:
     * // Use the resulting texture
     * sprite.texture = resultTexture;
     * ```
     *
     * Key Points:
     * 1. padding is not currently supported here - so clipping may occur with filters that use padding.
     * 2. If all filters are disabled or skipped, the original texture is returned.
     */
    public generateFilteredTexture({ texture, filters }: {texture: Texture, filters: Filter[]}): Texture
    {
        // get a filter data from the stack. They can be reused multiple times each frame,
        // so we don't need to worry about overwriting them in a single pass.
        const filterData = this._pushFilterData();

        this._activeFilterData = filterData;
        filterData.skip = false;

        filterData.filters = filters;

        const colorTextureSource = texture.source;

        const rootResolution = colorTextureSource.resolution;
        const rootAntialias = colorTextureSource.antialias;

        // if there are no filters, or all of them disabled, we skip the pass
        if (filters.length === 0 || filters.every((filter) => !filter.enabled))
        {
            filterData.skip = true;

            return texture;
        }

        const bounds = filterData.bounds;

        // this path is used by the blend modes mostly!
        // they collect all renderables and push them into a list.
        // this list is then used to calculate the bounds of the filter area

        bounds.addRect(texture.frame);

        this._calculateFilterBounds(filterData, bounds.rectangle, rootAntialias, rootResolution, 0);

        if (filterData.skip)
        {
            return texture;
        }

        const globalResolution = rootResolution;
        const offsetX = 0;
        const offsetY = 0;


Review comment (suggestion):
```suggestion
        if (filters.every((filter) => !filter.enabled))
```

Code after:
     * // Use the resulting texture
     * sprite.texture = resultTexture;
     * ```
     *
     * Key Points:
     * 1. padding is not currently supported here - so clipping may occur with filters that use padding.
     * 2. If all filters are disabled or skipped, the original texture is returned.
     */
    public generateFilteredTexture({ texture, filters }: {texture: Texture, filters: Filter[]}): Texture
    {
        // get a filter data from the stack. They can be reused multiple times each frame,
        // so we don't need to worry about overwriting them in a single pass.
        const filterData = this._pushFilterData();

        this._activeFilterData = filterData;
        filterData.skip = false;

        filterData.filters = filters;

        const colorTextureSource = texture.source;

        const rootResolution = colorTextureSource.resolution;
        const rootAntialias = colorTextureSource.antialias;

        // if there are no filters, or all of them disabled, we skip the pass
        if (filters.every((filter) => !filter.enabled))
        {
            filterData.skip = true;

            return texture;
        }

        const bounds = filterData.bounds;

        // this path is used by the blend modes mostly!
        // they collect all renderables and push them into a list.
        // this list is then used to calculate the bounds of the filter area

        bounds.addRect(texture.frame);

        this._calculateFilterBounds(filterData, bounds.rectangle, rootAntialias, rootResolution, 0);

        if (filterData.skip)
        {
            return texture;
        }

        const globalResolution = rootResolution;
        const offsetX = 0;
        const offsetY = 0;