-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blendMode can be changed when filter applies. #2222
Conversation
However, demo from #1598 wont work on that, because Multiply operation is not additive. Those small squares in intersections are black if you dont apply filter: UPD. but if we use two graphics with two multiplies - it will work like a charm ;) |
how it works: container.filters = [bloomFilter];
container.filterBlendMode = PIXI.BLEND_MODES.ADD; |
That patch has solved this case: http://www.html5gamedevs.com/topic/19029-cant-set-blendmode-with-filters/ |
By the way, PIXI.Container doesnt have blendMode on its own , so filterBlendMode can be good solution for two other cases:
|
This PR can't be merged for a couple reasons:
|
Help me with 1, I know you can change PR before you apply it. As for 2, I dont want to change other filters, and for example, BlurFilter does apply two times. I thought about that stuff for 5 days already, and I dont see other solutions. BlendMode is using data from renderTarget , its not a filter, its a special case. Also, to implement all standart blendModes we'll have to use "readPixels", we cant avoid that. |
what do you guys think about putting the filter blend mode property as a property on the filter as it feels like its more of a filter specific thing? |
It makes sence only for last filter in the list, and we have to implement that thing inside FilterManager, so filters will be able to call that special method which is taking care of blendMode. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
blendMode can be changed when filter applies. No changes in current filters are required.