Jump to content

How to exclude a child from a filter applied to the group it belongs to?


wayfinder
 Share

Recommended Posts

I apply a filter to a rather large group of sprites. How can I exclude one or more specific sprites from being affected by the filter? Is it even possible? Would I have to apply the filter to every sprite in the group separately, and then just leave out the ones I want unaffected? What would that do to performance? I'm talking possibly hundreds of sprites here, and the filter is called with 4 textures...

 

Please help me!

Link to comment
Share on other sites

Okay, I tested out applying the filter separately to all the components of the group and it absolutely kills the performance - so that one's out, at least in its current form. I wonder if, since the images would all use the same 4 textures, those could be uploaded to the graphics card just once and then used by all the filters without further performance hits? Is there a way?

Link to comment
Share on other sites

Ah right, sorry about that. How about nesting groups? Create a new group that will contain all the display objects you want filtered, then put that under your new group. Meanwhile, your original group will still contain the display objects that shouldn't be filtered, then add your new group to your original group. Not sure if it will work but maybe worth a try?

Link to comment
Share on other sites

I'm not sure how to do that - the filter is applied after the group has been rendered. The object I want to exclude is somewhere inside the group, possibly half-obscured by other parts of it. By the time the filter gets to do its thing, I don't think I can separate out which pixels belong to which sub-object.  

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...