ramshreyas Posted April 1, 2015 Share Posted April 1, 2015 Instead of specifying a region I want drawn, I want to specify a "hole" in my sprite. The hole is dynamic (can change every frame). Performance-wise, it's not feasible to use a regular mask (too expensive to specify a mask that is everything but the hole every frame), I need to use an inverse mask. This (old) thread describes a hack on how to make it work: https://github.com/GoodBoyDigital/pixi.js/issues/252 It involves changing gl.EQUAL to gl.NOTEQUAL in a certain file, but this hack is obsolete as there's a new WebGLStencilManager.js file in its place. Any ideas how to get inverse masks working using Pixi (WebGL)? Or another solution? Again, it's a dynamic mask that defines regions *not* to draw. Quote Link to comment Share on other sites More sharing options...
Grimnick Posted March 24, 2016 Share Posted March 24, 2016 Did you ever get this working? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 24, 2016 Share Posted March 24, 2016 @Grimnick It wont work just like that, because you have to specify rectangle bounds for that thing. It can be done with custom filter though - render your stuff into renderTexture and then apply special filter with specified bounds, like SpriteMaskFilter Quote Link to comment Share on other sites More sharing options...
Grimnick Posted March 24, 2016 Share Posted March 24, 2016 I'll look into that 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.