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
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
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