Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any way to apply masking as a batch operation to multiple sprites? #8

Open
rkdrnf opened this issue Jan 5, 2019 · 1 comment

Comments

@rkdrnf
Copy link

rkdrnf commented Jan 5, 2019

I have multiple sprites to apply mask to each. each mask is same in its shape and only its positions is different from each other.

I'm currently using heaven.Sprite.maskSprite and "spriteMasked" plugin to apply mask to sprites and it seems masking for each sprite is done as single operation.

I hope I can apply mask to all those sprites in a single batch operation.
Is there any way that I can achieve this using pixi-heaven?

To help your understanding, these are things that I want to apply mask
image
so there would be a mask applied to each heart.
and currently mask is applied total 5 times, 1 for each heart

I assumed this by inspecting webgl drawing procedure
image
You can see that masking shader is applied 5 times in a single frame.

@ivanpopelyshev
Copy link
Collaborator

I thought I fixed that bug. Give me a fiddle please, I'll debug it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants