Transparency ordering not working with shader graph

Using Unity 2022.2.0f1

When creating a new URP Shader graph (for both Lit and Unlit) and setting the surface type to Transparent, the transparency ordering for entities seems broken.
However, the builtin URP/Lit shader works as expected.
I may be missing something, but cant for the life of me figure out why the shader graph acts differently compared to the built in shader.

Recreated in the TransparencyOrdering sample from
https://github.com/Unity-Technologies/EntityComponentSystemSamples/tree/master/HybridURPSamples
Actual result (using a very basic lit URP shader graph, set to transparent, instead of URP/Lit):



Expected (no changes to sample, using the builtin URP/Lit shader):

Check the Material is set to Transparent. The Shader Graph settings are often overwritten by the Material Settings. It is very annoying.

1 Like

These material settings? Setting the Queue control to UserOverride and the RenderQueue to Transparent didnt seem to make a difference.
8662383--1166442--upload_2022-12-14_21-25-53.png
This made no difference.
8662383--1166445--upload_2022-12-14_21-28-17.png

Oh and also, they are flickering a lot, like somehow they get rendered in a different order each frame? Not quite sure on that.

Sorry. I was thinking about HDRP. In HDRP, the “Surface Options” are populated with the “Surface Type”, “Double-Sided”, ect.

1 Like

having the same issue

I can confirm that this seems to be a bug.

As a workaround, you should be able to place the DepthSorted_Tag component on transparent entities manually, which should fix the rendering. This is supposed to happen automatically, but it seems that there is a bug in the current version.

3 Likes