URP sprite shader issue


During the early development process of the week, I faced a issure where Unity's URP shader graph has some issue with sprite shader. The main issue is that the alpha blending is incorrect. And after doing some research, I realized that this happens in Unity 2022, which is the version our project is using. Here is an example of incorrectly rendered sprite:


The solution I came with is to simply create a builtin unlit shader, and by clicking into the generated shader of the shader graph, I can copy over the generated code into the builtin one, and modify it so that it correctly handles the alpha blending.  I used this to make the sprite mask of fog of war, so that it only shows the player explored regions. Here is the most current version of mini map and the mask that the shader generates:

Author: Zeyuan Song

Posted on 04/26/2024

Get Suits of the Abyss

Leave a comment

Log in with itch.io to leave a comment.