Search Issue Tracker
By Design
Votes
0
Found in
6000.0.20f1
Issue ID
UUM-82378
Regression
Yes
Texture2D "_MainTex" ShaderGraph property reference is empty when attached to a GameObject with a SpriteRenderer
Reproduction steps:
1. Open the attached “MainTex.zip” project
2. Select the “Triangle” GameObject from the Hierarchy
3. In the Inspector expand the shader properties
4. Observe the _MainTex property
Expected result: Sprite is visible in the _MainTex property
Actual result: The _MainTex property is empty
Reproducible with: 6000.0.18f1, 6000.0.20f1
Not reproducible with: 2021.3.44f1, 2022.3.47f1, 6000.0.17f1
Reproduced on: Windows 10 (User reported), Windows 11
Not reproducible on: No other environment tested
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
The shadergraph SpriteLit is relying on SpriteRenderer's color being set on the Vertex Channel.
This is only valid for Dynamic-Batching as Renderer Color is baked to Vertex Colors (mainly when batching multiples sprites that use the same texture (atlas, spritesheets etc.) but use different Color.
This is not valid when using SRP-Batcher and Renderer Color is set in unity_SpriteColor instead when SRP-Batcher is active.
So either disable SRP-Batcher or make Shader incompatible with SRP-batcher.
See Removing shader compatibility in https://docs.unity3d.com/Manual/SRPBatcher.html