Search Issue Tracker
By Design
Votes
9
Found in [Package]
14.0.0
Issue ID
1383356
Regression
Yes
[ShaderGraph] Alpha is shown as black when using a custom Shader Graph material on an Image component
How to reproduce:
1. Download the attached project "1383356.zip"
2. Open Scenes/SampleScene Scene
3. Open Game view and inspect the image
Expected result: The image is shown as a red block
Actual result: The image is shown as a red block with black background (the red block is not visible on 2021.2.0b13 and older versions)
Reproducible with: 12.0.0 (2021.2.0b2), 12.1.4 (2021.2.11f1), 13.1.5 (2022.1.0b7), 14.0.0 (2022.2.0a5)
Not reproducible with: 10.8.1 (2020.3.28f1), 12.0.0 (2021.2.0b1)
Could not test with: 7.7.1 (2019.4.35f1) (can't create shader with required steps)
Notes:
- Only reproduces in Game view in Editor, the background is transparent in builds and in Scene view in Editor
-
tvtyler
Apr 19, 2023 13:55
So it worked before by a coincidence, but can't be fixed now. Sad.
-
ZaharAlone
Jan 30, 2023 21:54
I support the speakers above, this looks like a bug. And never once by design.
-
BasicallyGames
Dec 29, 2022 16:07
If this is "by design" then the design needs to be changed. There's no reason ShaderGraph shouldn't be usable with Unity UI. My Unity 2020 project relies *extremely* heavily on ShaderGraph for UI shaders. If this is never changed I'll either be stuck on Unity 2020 for the rest of the project's development (Which admittedly isn't a huge issue unless I'm ever required to update to a supported Unity version for console ports or something) or I'll have to spend considerable time and effort porting my UI shaders to HLSL (Which would also be a huge pain to maintain since I by-and-large want my UI images to behave the same way sprites do. The fact my UI and sprites can share the same ShaderGraphs currently is a huge benefit in this project).
-
Thygrrr
Aug 03, 2022 16:05
Inacceptable and resolution; URP has been out of preview for years and Unity UI is a core part of the Engine.
-
guildtag
Jul 01, 2022 01:08
Lame "resolution". I wouldn't have upgraded my project if I had known this was an issue :(
-
Tedraxx
Feb 25, 2022 09:24
If it's a coincidence, it's not "By Design" that alpha suddenly renders black. Even if it was a coincidence that it initially worked, the fact that it not working now is breaking lots of custom UI visuals so should be looked at as missing core functionality.
What alternative is there to customize the looks of Sprites rendered via UI Image through shaders?
-
Fressbrett
Feb 22, 2022 16:44
There is a forum thread regarding this issue, which multiple people have experienced now:
https://forum.unity.com/threads/shader-graph-ui-image-shader-does-not-work.1202461/This bug is a major dealbreaker for us, rendering 2021.2.12f1 unusable for us. All Ui Images that use custom ShaderGraph materials now render black instead of transparent alpha!!
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- GPU utilization increases by 20% on Meta Quest headsets when Render Graph is enabled on 6000.0.16f1 and higher
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
Resolution Note:
Unfortunately, we didn't officially support or test against the canvas renderer. You can follow the feature request on our product board: https://portal.productboard.com/unity/1-unity-platform-rendering-visual-effects/c/50-ui-integration-with-shader-graph.
Any existing functionality was, unfortunately, just a coincidence. Making this a reliable and supported feature will require a bit of cooperation from a few other teams, so it's something we need to make sure we treat as a complete feature.