Filter failure when auto-fit is true & object only partially visible on screen

by ShukantPal

HTML

<script src="https://pixijs.download/v5.2.0/pixi.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pixi-filters.js"></script>
<!DOCTYPE html>
<html>
  <head>
    <title>PixiJS measure() p.o.c</title>
  </head>
  <body>
     <canvas id="target-view">
     </canvas>
  </body>
</html>

JavaScript

const canvas = document.getElementById('target-view');
const app = new PIXI.Application({
	view: canvas,
  width: 256,
  height: 256,
  backgroundColor: 0xeeeeee
});

const graphics = new PIXI.Graphics();
graphics.width = 128;
graphics.height = 128;
graphics.beginFill(0);
graphics.drawRect(0, 0, 128, 128);
graphics.endFill();

if (true) {
	graphics.filters = [
    new PIXI.filters.KawaseBlurFilter(8, 6, true)
  ];

  graphics.filters[0].autoFit = true;
  graphics.filters[0].padding = 8;

  graphics.x = 2; // change x & y to 0 or 1
  graphics.y = 2;
}

app.stage.addChild(graphics);