Is it possible to add multiple kind of filters to the same display object. The documentation says there is a filter group but could not find it .
Multiple Filters on the same DisplayObject(13 posts) (8 voices)
Sorry, I had to drop that feature for this version -- so currently, you can't combine filters.
May I ask where you saw that in the documentation? If that's still written somewhere, I should update the text.
The comments says
/** The filter or filter group that is attached to the display object. The starling.filters
* package contains several classes that define specific filters you can use.
* Beware that you should NOT use the same filter on more than one object (for
* performance reasons). */
Thanks for the link! I've updated the documentation to avoid confusion and don't set up wrong expectations.
Aww , I thought they will be supported soon
Ok I'll bite this ... so if one was to try and add several filters to a DisplayObject, how could we achieve this? Let's say... stacking containers on top of eachother, each one with it's own filter... would it work? Also what would be the expected impact on performance? 1 draw call per stack?
Sorry, Fernando, you currently can't achieve if through the existing filter classes. The only way that would work is manually creating a new filter class that combines all the other filters into one class (pass one uses the code from ColorMatrixFilter, pass two from BlurFilter, etc.).
That feature will come, but I simply had to delay it to get filters out at all
I was able to get this to work: apply a filter to a sprite that has a child sprite which contains images that have a blur filter and the child sprite has been flattened. Unfortunately I need to adjust the blur using a slider in the UI and the unflatten/flatten repetition is causing the image to distort.
Is there any news on that feature ?
I'm really looking forward to use multiple filters in a proper way (it's very limiting now)... I really think this will bring Starling to a new stage of awesomeness.
Could someone please give more information about what are we exactly waiting for? I mean is there an Adobe feature request? I didn't see any Starling feature request in the issue tracker either...
Thanks in advancePosted 2 years ago #
Adding a vote to the multiple stackable filters feature.
Need to combine a blur with brightness reduction to simulate depth of field.Posted 2 years ago #
So what is the current situation with multiply filters? As far as I undersand the only posible way is to implement some filter and produce agal program with part of another one?!
I think that if it impossible to combine filters in Array we can at least realize some filter cooler for example:
var f1:BlurFilter = new BlurFilter() f1.setting1 = 1 var f2:ColorMatrixFilter = new ColorMatrixFilter () f2.setting1 = 3 var f3:FragmentFilter = FilterCooler.build(f1.agalSource, f2.agalSource) var s:Sprite = new Sprite() s.filter = f3;
You must log in to post.