Jump to content

Filter on sprite batch


pyre
 Share

Recommended Posts

Hi guys,

I have a sprite batch containing 250+ 64x64 sprites from a single tileset / spritesheet.

I need to apply a filter to the entire batch rather than per-sprite (way too slow!)

I seem to only be able to add filters to the stage or single sprites. Anything else seems to do nothing.

Is there any way I can do this?

My original goal is to create an Overlay filter (Since the overlay blend mode doesn't work in WebGL) and apply it to all the sprites so they mix correctly with what is rendered underneath them.

Thanks!

Link to comment
Share on other sites

10 minutes ago, samme said:

Did you try 


spriteBatch.filters = [ overlayFilter ];

?

Yes, this does nothing. I'm not sure why though. Placing the same filter on the individual sprites works fine (besides lowering the frame rate to <10 fps)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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