Search Issue Tracker
By Design
Votes
0
Found in
2022.3.62f1
6000.0.48f1
6000.1.3f1
6000.2.0b1
Issue ID
UUM-105170
Regression
No
Unexpected Material change/transparency when switching between ShaderGraph and material at runtime in HDRP
Reproduction steps:
1. Open the attached “IN-101574.zip” project
2. Open the “OutdoorsScene”
3. Enter Play mode
4. Observe the Quad material in the Game view
5. Press “T” on the keyboard
6. Repeat the 4th and 5th steps
7. Observe the Quad material
Expected result: The material remains white/not transparent
Actual result: The material turns transparent/gray
Reproducible with: 2022.1.0a1, 2022.3.62f1, 6000.0.48f1, 6000.1.3f1, 6000.2.0b1
Reproducible on: Windows 10 (User reported), Windows 11
Not reproducible on: no other environment tested
Notes:
- Pressing “T” switches between “Material 1” and “Shader 1” referenced on the “LoadObjectRuntime” GameObject, and switching back from “Shader 1” to “Material 1” produces the problematic behavior
- Could not reproduce with URP, only reproducible with HDRP
- Also reproducible in the Player
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
It seems like you are not setting up your dynamically created materials correctly. When you change the underlying shader, you are creating a new material instance that does not have the same properties. The properties cannot be copied because it is not the same underlying shader. You need to setup all the material properties again if you change the underlying shader.