Jump to content

PIXI.AbstractFilter was not found


Recommended Posts

I'm using Pixi.js 6.0.4 (installed through NPM). Anyway, I get an error that AbstractFilter is not found while using it like this:

Quote

const shader = new PIXI.AbstractFilter('', gridShader, uniforms);

Part of the error message:

export 'AbstractFilter' (imported as 'PIXI') was not found in 'pixi.js' (possible exports: ...

Where is it then? I also looked at pixi-filters package ant it's not there either. Doesn't NPM version include AbstractFilter (and if so, why) or does it go by a different name in the version I am using?

Link to post
Share on other sites

AbstractFilter was part of pixi v3. Now its just Filter. While you're at it, for compatibility with v3 filters its recommended to add "container.filterArea = renderer.screen" , and specify vertex shader if it was default.  more details on https://github.com/pixijs/pixijs/wiki/v5-Creating-filters and https://github.com/pixijs/pixijs/wiki/v4-Creating-Filters . Also if your filter doesnt need actual texture imput (no usage of sampler)  - just use mesh-shader instead https://pixijs.io/examples/#/mesh-and-shaders/triangle-textured.js , just supply it a quad instead of triangle

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...