The Problem: I decided to add URP to a project, to make a specific light in a scene, but because of that the SpriteMask that hides a border is not working anymore.
Solution: Find a shader that replicates the SpriteMask Component.
It's very similar to the Photoshop/Illustrator mask, it have a texture that's the image to be shown, and other image that will set the alpha limits to be rendered. With URP2D in Unity this makes not work as expected anymore.
So I've found a shader that make the SpriteMask work in a URP 2D environment. I do now know the original author of the shader, but I decided to store in a github repository, with materials and prefabs, you can find it here : https://github.com/Falme/Unity-URP-2D-SpriteMask/tree/main
Источник: dev.to
Наш сайт является информационным посредником. Сообщить о нарушении авторских прав.
gamedev unity3d