The Transparency options for "2D Renderer Data" on URP Assets are broken, unused, or undocumented

,

I’ve gone and tested this feature on every version of URP I could find, from 2019.3 to 2021.1, and they just don’t seem to do anything, even on 2021 where it’s no longer marked “Experimental”:
7473167--918530--upload_2021-9-4_18-21-57.png

It’s even included in the screenshot in the docs, but the docs themselves don’t seem to bother explaining them.

This is the equivalent setting that is shown in Project Settings Graphics, when no custom asset is used.
7473167--918536--upload_2021-9-4_18-28-8.png

But, when using a custom render pipeline asset (including the reference to 2D Renderer Data), the settings are hidden, I assume because you are meant to use the settings on the Renderer 2D Data.
7473167--918539--upload_2021-9-4_18-28-27.png

But… while the Graphics setting version does work when no URP asset is set, the setting on the 2D Renderer Data does not work and does not seem to have ever worked.

The only thing that seems to help is if I write a little helper component that references the Camera, and tweaks its Camera.transparencySortAxis and Camera.transparencySortMode at runtime.

Here’s the settings on the URP Asset showing it is linked to the 2DRD:


And the camera also suggesting it’s being used:
7473167--918563--upload_2021-9-4_18-46-8.png

Am I missing something obvious? Are 2DRD transparency sort properties just broken? Or is there some other random field or asset or API I need to implement to make it work? Have other people experienced this? If so, what’s your preferred workaround?

Hi, what version of 2021.1 are you using? This bug is already fixed from 2021.1.1.

I have tried 2021.1.18f, 2020.3.15f2, and 2019.4.28f1 (with both LWRP and URP)

Huh, I wonder if there’s funky going on in the upgrade path or the sprite materials that’s causing it to not work. I’ll dig into it some more.

Definitely not the upgrade path. I just tried a new project (started in 2D, then added Universal RP, and a couple of other approaches), and yeah, it’s still only working if I remove the RP and use the graphics tab directly for some reason. I tried both creating the dedicated “Pipeline Asset (2D Renderer)” as well instead of creating the Asset + 2D Renderer Data separately.

I’ve also tried switching the SpriteRenderers’ materials from Sprites-Default to Sprite-Unlit-Default; that didn’t seem to help either

I’ve attached a really simple project from 2021.1.18f that reproduces the issue.

Nothing in the UI seems to be throwing an error or suggesting why this is not working.

It’s probably something simple somewhere, but I’m just totally missing it.

7475227–918971–CustomAxis2DRendererTestNew2021-Copy.zip (407 KB)

I investigated this issue and found out that the initial fix overlooked the unlit pass. Therefore the transparency sort mode and axis isn’t taken into account when there are no lights in the scene. I’ll submit a fix and let you know when it is released. A workaround for now is to add a Global Light 2D in the scene.

Dude, you are a hero! Not just swooping in with a fix for a future release, but also a workaround I can integrate trivially. Thanks so much!!