- Home /
Cutout shader for at specific transforms.
Hey Guys,
I am currently working on a 2D game where one can shoot paint that sticks to walls, floors etc. and gives the player e.g. the ability to jumo higher.
My current approach to realis this is to have two different Tilemaps: One is the real environment and the other one just the paint painted onto the environment. I made it so that the paint is invisible and can only be revealed by Sprite Masks, which the players projectiles instantiate when hitting a object, giving the effect of painting the environment.
However due to the high amount of projectiles and the resulting high amount of Sprite Masks, the FPS drops quite fast with every new Sprite Mask (that in addition has a box trigger attached to it to detect the player).
Is there a solution to this via a cutout shader? So that I can e.g. add Vector2s that reveal the paint in a given radius?
Additionally I was thinking about not instantiating a box trigger everytime, but add vertices at every hitpoint to one edge trigger.
Your answer