Search Issue Tracker
Fixed in 10.3.0
Votes
0
Found in [Package]
10.2.0
Issue ID
1294026
Regression
No
Shader has different effects depending on whether the material was created by selecting the shader or applying it afterwards
Reproduction steps:
1. Open the project attached by the user
2. Open "SampleScene"
3. Observe that "SelectedQuad" has distortion and "UnSelectedQuad" doesn't have distortion
Expected result: the shader acts the same whether it's created by selecting the shader or applying it afterwards
Actual result: the shader distortion doesn't work when it was applied to the material after creating it
Reproducible with: 10.1.0 (2020.2.0b11), 10.2.0 (2020.2.0b13, 2021.1.0a7)
Cannot test with: 7.3.1, 7.5.1 (2019.4.15f1), 8.2.0 (2020.1.15f1) due to the UnlitDistortion shader errors if moved to any other project
Notes:
- When both materials created are opened in a text editor, we can see that the one that was created by applying the shader to the material after creation has "DistortionVectors" and "RayTracingPrepass" in "disabledShaderPasses" section, whereas the one that was created by selecting the shader in the first place don't have those properties
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 Version Control window opens when right-clicking the icon on the main toolbar
- [Android] Native Crash on TilemapRendererJobs
- Character text is not bold in the title of GameObjects in the Inspector when naming using specific language characters
- IndexOutOfRangeException and GUI Error get thrown in Scene View when Articulation Body Edit Joints is set to "Edit the joint angular limits"
- Volumetric fog is not rendered around GameObjects that are baked with APV when Sky Occlusion is enabled
Resolution Note (fix version 10.3.0):
This is part of how the material system works. When a material is created from a shader, all the default values get applied to the material. Changing the shader will not remove default values, so whatever defaults were set from the previous shader will carry over (which includes things like disabled passes and keywords).