Jump to content

Manipulating masks and displacement maps in pixi.js


TheMonkeyCandleholder
 Share

Recommended Posts

Is it possible to put two displacement maps on top of each other and have them interact? (decrease each map's alpha by 50% then I guess?)

There are multiple ways to do it.

Here is one: https://gameofbombs.github.io/examples-heaven/?v=v4.8.8#/picture/displacement-backdrop.js , pixi 4.8.8 + pixi-picture plugin. Requires that whole stage has to be in another filter. Its not ported in v5 yet.

Another is to take render your displacement in texture and then apply DisplacementFilter using that texture. It can be simplified by using "pixi-layers" getRenderTexture() trick, like here: https://pixijs.io/examples-v4/#/plugin-layers/trail.js , it should work on v5 too.

Anyway, you have to learn what RenderTexture is.

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...