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
Suits of the Abyss
Status | In development |
Author | AstralArchitects |
Genre | Action, Platformer |
Tags | Roguelike |
More posts
- Carrying player data between scenes in Unity (Pt.3, The Finale)May 04, 2024
- Player ground detection issueMay 02, 2024
- Carrying player data between scenes in Unity (Pt.2)Apr 27, 2024
- Weapon Effects and AnimationsApr 27, 2024
- Resolution issuesApr 27, 2024
- Minimap and fog of warApr 20, 2024
- Player WeaponsApr 20, 2024
- Carrying player data between scenes in UnityApr 13, 2024
- Poker Hand DetectionApr 13, 2024
Leave a comment
Log in with itch.io to leave a comment.