Johnny Kontrolleti Posted April 30, 2020 Share Posted April 30, 2020 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? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 30, 2020 Share Posted April 30, 2020 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. , Quote Link to comment Share on other sites More sharing options...
Johnny Kontrolleti Posted April 30, 2020 Author Share Posted April 30, 2020 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? Quote Link to comment Share on other sites More sharing options...
Johnny Kontrolleti Posted April 30, 2020 Author Share Posted April 30, 2020 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! ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 30, 2020 Share Posted April 30, 2020 That or you can just add mix between original color and your warp Maybe your solution is better for that case Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.