'In AndEngine, how do I apply and use Blending/Shader Fragment texture for masking a single Sprite?
I am helping to develop a game in AndEngine which involves a huge varieties of cards. So these cards will be dealt faced down(refer to this for card face down example) and player will be able to choose a card and slowly squeeze(refer here for card squeezing example) to allow them to take a peek on the content.
Here's the problem that I face: The card squeeze feature allow player to squeeze a card from multiple directions. For squeezing the corners of the card(refer here), it would be problematic to create 40+ cards asset to show the fold animation. So I decided to explore the possibility of using shader fragment for texture masking.
The goal is to cover the Card Sprite corner using a triangle-shaped shader texture to make the corner transparent. Then, gradually increase the triangle size covering Card Sprite corner to make it look animated. However, the shader texture will only affect the cards and won't affect Background Sprite, UI Button, or any other Sprites.
I am quite familiar with AndEngine Java, however, I am still highly inexperienced when it comes to the graphic or OpenGL part specifically where you can play with shader/blending. Hope I can get some guidance or reference here on how I can utilize shader/blending to achieve the result in AndEngine.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
