Hi everyone,
I’m trying to build something like this for my top-down 2D game:
A character (sprite) moves under a tree(top), where the treetop (sprite) is currently hiding the player. I want the character and a certain radius of the area around him to be visible despite being under the tree (by making the tree transparent in this area).
I managed to make the entire treetop sprite transparent by setting material.color.a, but the next step is to make only part of the sprite transparent.
The difficult thing is: I want the alpha to be a gradient as shown in the image below.
How would I approach this problem? I’m a shader noob, so I’d be grateful for detailed advice.
Thanks!