Filter on sprite batch

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.


Share this post

Link to post
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)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.