Sharpleaf Posted October 26, 2015 Share Posted October 26, 2015 I'm adding a filter to sprite (generated by RenderTexture) to make the sprite solid black.I've tried simply islandShape.tint = 0x000000and I've tried var makeBlack= new PIXI.filters.ColorMatrixFilter();makeBlack.brightness(0,false);islandShape.filters = [makeBlack];I've tried applying both to the texture and to the sprite that uses the texture. Now, if I add that sprite to a container just as a child (not a mask), then I see a nice, black shape (as I would expect and want).However, if I add the sprite as a mask to a container and start adding other sprites to the container, it acts as if the tint or filter was never applied. The details of the original untinted (or unfiltered) sprite shine through. Is this expected behavior? Did I stumble upon a bug? Or, am I doing something wrong? Thanks! Quote Link to comment Share on other sites More sharing options...
xerver Posted October 27, 2015 Share Posted October 27, 2015 Tint and filters are not applied to masks. Filters are applied as the last rendering step. Masks are not rendered. Quote Link to comment Share on other sites More sharing options...
Sharpleaf Posted October 27, 2015 Author Share Posted October 27, 2015 Tint and filters are not applied to masks.Filters are applied as the last rendering step. Masks are not rendered. ok, so I would have to apply the tint to the container before I put it through RenderTexture to get a solid black version of it? Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.