Custom unlit materials with transparency

I am having trouble getting a shader graph with transparency to work. Screenshot shows custom unlit material with transparency on the left, and the URP unlit material on the right (with varying offsets in Z for each mesh).

The shader graph version seems to be punching through depth depending on the viewing angle, and is also responding to light. I have tried changing various settings in the Graph Settings but nothing seems to make a difference.

I reported this as IN-55292 in case it’s a bug – if not and I’m misunderstanding something, then apologies in advance!



That definitely seems like a bug. I will look at your report, but I assume this is with the 0.2.2 release? We had this issue (punchthrough with transparent materials) with earlier versions, but we thought we had fixed it in 0.2.2.

Yes, 0.2.2. Thanks!

Can you verify that the issue is still present in 0.3.2/Xcode 15 beta 8/visionOS beta 3 (21N5233f)? I have your example project and I am so far unable to replicate the behavior in the simulator. One thing I do notice is that the URP/Unlit material is darker than the unlit shader graph. I believe this is because RealityKit is applying tone mapping to the URP/Unlit version.

It may be worth trying to reimport the shader graph, which will regenerate the MaterialX representation that we provide to visionOS. You can see that representation in /Library/ShaderGraph/Custom Unlit.usda. Notably, it should not have a value for opacityThreshold in the ‘def Shader “realitykit_unlit”’ section unless alpha clipping is enabled. That’s what was causing the punchthrough issue in earlier versions of PolySpatial.

Thank you! Yes, the punchthrough is fixed in 0.3.2. The tone mapping option is interesting (thanks for the pointer to the MaterialX file!) – will there be a way to control this from the Unity shader graph?

Currently, we disable visionOS’s tone mapping for all unlit shader graph materials, since that makes the final color results match those of the Unity renderer. We’re looking at ways to provide more customization of the MaterialX output, though, so we could potentially add a toggle for that behavior in the future.