#Wrong Alpha in Shader URP

1 messages · Page 1 of 1 (latest)

ember venture
#

Well, I think the solution is simple, but I'm too much of a beginner to know it. So, I'm creating a shader in Unity URP 2022.3.41f. But when I set the shader to transparent, my texture looks weird, as if I can see through the mesh but without transparency (see photo for details).

Thanks in advance for any answers.

barren notch
ember venture
#

@barren notch So if I understand correctly, this would come from a problem with how Unity URP manages the alpha?

#

thx you for your response

barren notch
#

There's three paths that I know of to mitigate it
First is to minimize the use of alpha, so only use it for something that must be semi-translucent and is simple geometry where sorting problems are not likely to occur, like particles
Second is to utilize workarounds like empty pass to only render the closest transparent surface, or maybe do some kind of manual polygon sorting, but those have caveats
Third is to implement Order Independent Transparency which isn't typically cheap, and how robust it is depends on the implementation
HDRP does have some kind of OIT of its own, I believe