pyre

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.

Thanks!

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.