Hello! I’m trying to turn an object semi transparent with URP shaders. I spent the past day looking for a solution and I found hundreds of people with my problem but none of those solutions worked for me
I’ve got a tree with URP/Lit shader. I need to turn it semi-transparent. The alpha value in the color setting doesn’t work if the surface is opaque, but if I set the surface to transparent transparency works but I get two drawbacks:
The shadows cease to exist, even with “Shadows ON” on the mesh rendered
The objects are rendered in the wrong order (this is the worst and seemingly common problem!)
Opaque:
Transparent:
As you can see the leaves are behind the tree’s trunk, and the leaves are rendered in the wrong order. I found a workaround for the shadows: I followed a tutorial online and created my Lit shader graph, added the texture, and set the shader to transparent, and shadows works fine with my fresh lit shader. I can also set transparency there. But the objects gets still rendered in the different order! I also tried to set the priority to high (value “50” in the urp Lit shader, value 5000 in my shader), but nothing changed…
What can I do? I’m currently using URP 10.3.2, and Unity 2020.3.0f1.
Technically it’s not possible and it is not used in any game or engines
I think all leave shaders are opaque with alpha cutout effect
Fade mode(transparent in URP) is not suitable for leave shaders. It’s for particle effects
Actually this not a fix to the problem, its just a fix to your model, and the problem still exist
I do not get it, why Unity havent fixed this issue so far, when there is a model that consist of different objects combined, when apply a transparence map, it start act like a flipped normal model and render what is behind, like not Z test
This is such a pain. I know this is an old post but if someone is still looking for help, this isn’t a fix for all cases but so far it’s been a decent work around for me.
In the material under advanced settings there is a priority slider where you can force the draw of that material to supersede other materials, basically putting them on different “layers” of importance. So if your ground materials are drawing over something in front of them, just set those particular materials to a lesser priority.
Personally I had a problem with a lava shader I made with Shader Graph URP. As Unlit it was showing alright, but couldn’t apply Normal Map to the rocky surface around the lava. So I just made 2 planes, one for the rocks and one for the lava and made it Lit. That was because the semi-transparent parts on the texture didn’t show alright and had red artifacts after lava passed trough them. I believe any object should have more materials applied on it to show transparency clip properly.