Jump to content

Remove filter with fade/transition


Johnny Kontrolleti
 Share

Recommended Posts

I have a `PIXI.Container()` I apply a shader/filter to using `container.filters = [filter]`.

Documentations says, to remove a filter, just set `container.filters = null`. 
This works, but it's kind of a hard cut, when the image/sprite inside of the container is still visible, hence my question:

Can I remove a filter with a kind of fade/transition?

Link to comment
Share on other sites

You can modify all the filters you use with param that mixes filter color with original color.

If you want an automation, you can re-create same approach i did in pixi-picture v4 ( still didnt move it to v5) - make a filter that is copying temporary renderTexture before other filters are applied, and a filter that mixes filters result with orig result.

 

Link to comment
Share on other sites

15 minutes ago, Johnny Kontrolleti said:

Sorry, but do you mean to modify f.e. a shader's vector and its values, which is causing the effect, from outside? 

 

vec2 warpAmount = vec2( 2.0 / 34.0, 1.0 / 16.0 );

In this case f.e. `vec2(0/0)` would remove the effect - that's what I should modify from outside?

That's it. Thanks! 

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...