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

Package: Shader Graph

-

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

  1. Response avatar

    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).

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.