MV Fix MV's blur filter?

You may already know the blur filter of PIXI.js v4 is bugged. So they use a canvas solution for the background. While it works for one time use static images, it is not fast enough for animation.
Is there any third party fix for the filter? It is not like I can copy the code from MZ's PIXI.

As for the bug, it seems the texture is not clamped properly, so the bottom and right black borders always bleed in.

Spoiler
1741135405245.png
There is a "blur" filter in Pixi Filter Control, though if it is handled any differently than how the v4 pixi blur filter is handled is beyond my scope of knowledge.
There's also the fact that the help documentation of the plugin is absolutely impenetrable to decipher, but for you maybe it might be easier for you to understand.

I rewrote a small portion of it for myself. It's incomplete, and, as I said, written mostly for myself, but I'll include it in the spoiler in case it helps at all:
Spoiler: Rewritten help info
Code:
* *** Filter Parameter List:
 * ---------------------------
 * https://github.com/cji3bp62000/hello-world/blob/master/RMMVplugins/FIlterController/filter-list.jpg
 * please download the above image
 * to check name and parameters of each filter.
 *
 * ==========================================================================
 *                                  PLUGIN COMMAND
 * ==========================================================================
 * |========================================================================|
 * | createFilter <id> <filterType> <filter-target> (<character>)           |
 * |   -> Command will cache a filter as specified.                         |
 * |========================================================================|
 * | setFilter <id> <filter parameters ...>                                 |
 * |   -> Command will spawn the filter                                     |
 * |   -> use v[x] to set a variable as filter param. (without backets [])  |
 * |   -> use r[x]~[y] to set param at a random value between x & y         |
 * |      -> Can also use v[x] with random params (r[x]~v[x])               |
 * |========================================================================|
 * | setFilterSpeed <id> <speed>                                            |
 * |   -> For animated filters ONLY                                         |
 * |   -> Sets animation speed for specified filter.                        |
 * |========================================================================|
 * | moveFilter <id> <filter parameters ...> <duration>                     |
 * |   -> Changes filter parameters of specified duration.                  |
 * |   -> use 'x' (without ') to indicate no change in param.               |
 * |========================================================================|
 * | moveFilterQ <id> <filter parameters ...> <duration>                    |
 * |   -> Will queue the movement after the current movement.               |
 * |========================================================================|
 * | enableFilter <id> <true/false>                                         |
 * |   -> enable or disable target filter.                                  |
 * |========================================================================|
 * | eraseFilter <id>                                                       |
 * |   -> Erases targeted filter                                            |
 * |========================================================================|
 * | eraseFilterAfterMove <id>                                              |
 * |   -> Erases target filter after movement duration completes.           |
 * |========================================================================|
 * ==========================================================================
 *
 * ---------------------------
 * ID:              Set a name for this controller.
 * FILTERTYPE:      Use filter by name (below)
 * FILTER-TARGET:   What is affected by the filter
 * CHARACTER:       (optional) Spawn filter on character
 * ++++++++++++++++++++++++++++++++++++++++++++
 * TARGET TYPES ||+++++++++++++++++++++++++++++
 * ++++++++++++++++++++++++++++++++++++++++++++
 * +| 0    ||Targets map and pictures.       |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +| 1    ||Targets everything (messages +) |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +| 2    ||Targets map (tiles & events)    |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +| 3    ||Targets only tiles.             |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +| 4    ||Targets only events.            |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +| 5    ||Targets all pictures.           |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +| 21   ||Targets tiles, events, parallax |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +| 31   ||Targets tiles and parallax.     |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +| 32   ||Targets only parallax background|+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +| 3999 ||Targets only the player.        |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +| 4000 ||Targets THIS event.             |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +|4000+x||Targets event. x = event ID     |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +|5000+x||Targets picture. x = pic ID     |+
 * +|++++++++++++++++++++++++++++++++++++++++|+
 * +------------------------------------------+
 *
 * ============================================
 * FILTER LIST & FILTER PARAMETERS
 * ============================================
 * **Use these names for <filterType>**
 * **
 * +|+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|+
 * +| bulgepinch x y radius str       || radialblur x y radius str quality  |+
 * +|-----------------------------------------------------------------------|+
 * +| godray angle gain lacun bright  || ascii scale                        |+
 * +|-----------------------------------------------------------------------|+
 * +| crosshatch                      || dot angle size                     |+
 * +|-----------------------------------------------------------------------|+
 * +| emboss strength                 || shockwave x y end amp length bright|+
 * +|-----------------------------------------------------------------------|+
 * +| twist x y rad str               || zoomblur x y rad str               |+
 * +|-----------------------------------------------------------------------|+
 * +| noise strength                  || blur strength                      |+
 * +|-----------------------------------------------------------------------|+
 * +| oldfilm sepia noise scratch     || rgbsplit rad angle                 |+
 * +|-----------------------------------------------------------------------|+
 * +| bloom blur scale thresh bright  || godray-np x y gain lacun bright    |+
 * +|-----------------------------------------------------------------------|+
 * +| adjustment gamma sat cont bright|| crt curv width cont noise size     |+
 * +|-----------------------------------------------------------------------|+
 * +| pixelate width height           || reflection-m (see reference pic)   |+
 * +|-----------------------------------------------------------------------|+
 * +| reflection-w (reference pic)  ||                                      |+
 * +|+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++|+
 * *shockwave: use -1 end for whole screen
 *
 * ============================================
 * CHARACTER LIST
 * ============================================
 * **Use for <character>**
 * -1+: game Player (inBattle: enemy id)
 *  0 : this event  (inBattle: current actor)
 *  1~: event ID    (inBattle: party member id)
 *  screen: screen.(mostly used for restricting to current map)
 * ============================================
@TheAM-Dol Thanks.
I checked that Filter Controller for MV, and tried a few blur related filters, like motion blur, kawaseblur.
For some reason they all have the same issue like my screenshot. Some other filters, like the CRT filter doesn't have this problem.
Spoiler
1741146364805.png
So maybe it is a general problem for MV's PIXI filters.
In which case, maybe someone more knowledgeable can help.
fwiw, have you considered upgrading MV's pixi?
Even if you are trying to develop a plugin or something that requires the version of PIXI that MV ships with, at least upgrading it will help you determine if it's a version related issue or something else.
About that, I'm trying to make a plugin so it can run on MV as well. I want the scene to run in the background while a menu is opened.
The blur effect is not too important though (I can make it optional). Maybe I can consider removing it if in the end I can't find a better filter. Maybe there are other simple effect like making the background darker.
Is there a black sprite below (e.g. this._blackSprite) that is bleeding through? I'm not super-knowledgable about MV, but I'm wondering if the blur is feathering the edges of the image and letting a lower-level sprite bleed through.
There's the background color of the scene. But I don't think it is the reason. From the screenshot you can see the left and top side is clean.
'm trying to make a plugin so it can run on MV as well.
Sure, I get that. I was just suggesting, as a point of troubleshooting, to rule out whether it is related to PIXI at all, and if so to figure out if it's exclusive to the MV version.
That's why I suggested trying to upgrade PIXI just as a troubleshooting step, not as a fix.
By the way, I tried rotating the whole scene by 180 degree. The glitched area doesn't change.

Spoiler
1741157560901.png

EDIT: Sorry for the self reply.
I think I found a solution for the blurred background without fixing the bug.

The code has two optmizations for the original snapshot background feature.

1) Make a fastSnap function for the Bitmap class. The returned bitmap does not use a canvas like the old snap function. It links the render texture to its base texture. This function is very fast, unlike snap, which gets pixel data from the render texture before converting it into a canvas.

2) Add a blur filter to the sprite, instead of use the old canvas solution. Again, it is very fast and can be modifed for real time rendering. To hide the bug mentioned in the first post, I just add a child sprite which uses the same bitmap. The child sprite will have the blur filter, while the parent works like a background so you don't see the darker background behind. Since the border is very thin and smooth the flaw is very well hidden. Unless you want a very heavy blur.

JavaScript:
Bitmap.fastSnap = function(stage) {
  var width = Graphics.width;
  var height = Graphics.height;
  if(!this.fsBitmap){
    this.fsBitmap = new Bitmap(width, height);
    this.fsBitmap._setDirty = function(){};
    this.fsBitmap._dirty = false;
    this.fsTexture = PIXI.RenderTexture.create(width, height);
    this.fsBitmap.__baseTexture = this.fsTexture.baseTexture;
  }
  if (stage) {
    Graphics._renderer.render(stage, this.fsTexture);
    stage.worldTransform.identity();
  }
  return this.fsBitmap;
};

SceneManager.fastSnap = function() {
    return Bitmap.fastSnap(this._scene);
};

SceneManager.snapForBackground = function() {
    //webgl
    if(Graphics.isWebGL()){
      this._backgroundBitmap = this.fastSnap();
      this._backgroundBitmap._needBlur = true;
    }
    else{
      //canvas mode
      this._backgroundBitmap = this.snap();
      this._backgroundBitmap.blur();
    }
};

(function(alias){
Sprite.prototype.update = function() {
  //add blurred version over the normal one, to hide the flaw
  if(this.bitmap && this.bitmap._needBlur && !this._blurChild){
    var spriteBlur = new Sprite();
    spriteBlur.bitmap = this.bitmap;
    if(!Sprite._blurFilter){
      var blurFilter = new PIXI.filters.BlurFilter();
      blurFilter.blur=1;
      blurFilter.padding=0;
      Sprite._blurFilter = blurFilter;
    }
    spriteBlur._filters = spriteBlur._filters||[];
    spriteBlur._filters.push(Sprite._blurFilter);
    this.addChild(spriteBlur);
    this._blurChild = spriteBlur._blurChild = spriteBlur;
  }
  alias.apply(this, arguments);
};
})(Sprite.prototype.update);
wont it help to increase it like:
this.fsTexture = PIXI.RenderTexture.create(width + 5, height + 5); (or by 10)

or the increase the boxWidth of the screen by +5 or +10?

as graphicWidth = 816
than boxWidth = 821?

I know some does that because of the screenshake, so you avoid black bars on
the sides, but unsure if this fix the blur bit.
@ShadowDragon I tried that before, but it seems the filter area can't extend outside of the screen, no matter how big the sprite is.

By the way, the the fixed version also looks a bit better than the original one.
Spoiler
1741185815326.png
I don't know how the original works, but it messes something up based
on the blur filter you did, nice going 🙂

Original thread: https://forums.rpgmakerweb.com/threads/fix-mvs-blur-filter.176000/