I just run into the same problem and I digged into the frame debugger where all the passes that your guys mentioned where showing up and screwing up the sprite:
I don’t want to update the generated shader code each time I change the shader graph so I suppose I’ll go with an old school hand written shader. This is the base shader I am using (I’ll include all the effects I need here):
Is this still not fixed? I keep getting alerts for this thing.
Actually I’ve been using a seperate overlay camera for my ui ever since. I found that it’s much better to manage than having a humongous overlay canvas hanging around your scene. But I also understand the comments that don’t want to switch to that workflow.
Even so… won’t Unity fix this? This still seems very basic and I’m still getting alerts and complaints. Like I said, I don’t think copying the default shader and editing to fix it is a very scalable solution. I’m unfollowing this thread but please be aware of this issue, the staff who are responsible.
I ran into another quirk with this today, so thought I’d link here in case it’s relevant to anyone else.
In short, on Android devices my custom UI shader was disappearing whenever an OnApplicationFocus(false) event occurred. Had to weed out a few more chunks of shader code to stop it from happening:
I’m with sonolil - I would love it if Unity either made Sprite Unlit compatible with UI again, or made an official UI Shadergraph version. Surely UI shaders would be a pretty popular use for Shadergraph.
Beginning in 2023.2 beta 16, you can now select Canvas as a new Material Type in the Graph Inspector for HDRP, URP, and Built-In. This new Material Type creates shaders that are compatible with UGUI Canvas elements, such as Image. Using Shader Graph for UGUI Canvas elements allows users to create an infinite array of animated effects and tune the behavior and appearance of the UI while also reducing performance and memory costs.
I think I ran into the same issue some here have reported.
My custom Sprite Unlit ShaderGraph was rendering transparency correctly in the scene view.
Scene View:
But in game view, transparency seemed to revert to some serialized solid colour (in my case red):
Even though I was using the “Sprite Unlit” Material in my ShaderGraph, it seems the serialized “Alpha Clipping” property of the “Unlit” Material was causing the failure.
I managed to get this working by doing the following:
Switch your ShaderGraph to use “Material: Unlit” in the Graph Inspector.
thanks for providing detailed feedback and taking the time to record a video.
Let me ask which version of Unity, URP and Shader Graph are you using?
As I just tested in 2023.2.0a17 and it seems to work just fine.
THANK YOU SO MUCH FOR THE CAMERA INFO!!!
I tries lituerly EVERYTHING to make my shadergraph work, and while scene view was displaying correctly, game view just didnt work properly, this fixed it.
Tysm!!