nishaant Posted April 2, 2021 Share Posted April 2, 2021 i am new to canvas+pixi world, so pardon me for mistakes, well i applied bloom filter on svg with blur = 20, now how i can elemenate this rectangular cut? any smoothing or expand this rectangle to upto faded edges? Quote Link to comment Share on other sites More sharing options...
AlexandreZara Posted April 3, 2021 Share Posted April 3, 2021 Hello! Kinda new here as well, had the same issue the other day. As I understand filters are applied according to a 'FilterArea' that fits the container by default. You should set it with a rectangle the fits the texture plus padding. container.filterArea = new PIXI.Rectangle(0, 0, someWidth, someHeight); Just be careful with the positioning, looks like FilterArea does not automatically move with the container. Little example here: https://codepen.io/alexandrezara/pen/KKamxJW Quote Link to comment Share on other sites More sharing options...
nishaant Posted April 7, 2021 Author Share Posted April 7, 2021 ok, it worked, for future people(including me) here is a simple fix: const bloomFltr = new PIXI.filters.BloomFilter(); const heart = new PIXI.Sprite(heartTexture); heart.filters = [bloomFltr,blurFltr]bloomFltr.blur =120;bloomFltr.padding =5; 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.