itch.io is community of indie game creators and players

Devlogs

URP sprite shader issue

Suits of the Abyss
A downloadable game for Windows

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

Download Suits of the Abyss
Leave a comment