diff --git a/com.unity.render-pipelines.high-definition/CHANGELOG.md b/com.unity.render-pipelines.high-definition/CHANGELOG.md index 9c3469d1869..531f7ba660f 100644 --- a/com.unity.render-pipelines.high-definition/CHANGELOG.md +++ b/com.unity.render-pipelines.high-definition/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Fixed Clearcoat on Stacklit or Lit breaks when URP is imported into the project (case 1297806) - Fixed timing issues with accumulation motion blur - Fixed an issue with the frame count management for the volumetric fog (case 1299251). +- Fixed an issue with material using distortion from ShaderGraph init after Material creation (case 1294026) ### Changed - Removed the material pass probe volumes evaluation mode. diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs index 61e90c4d055..49b7e012881 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/Unlit/BaseUnlitGUI.cs @@ -299,6 +299,12 @@ static public void SetupBaseUnlitPass(this Material material) material.SetShaderPassEnabled(HDShaderPassNames.s_MetaStr, enablePass); material.SetShaderPassEnabled(HDShaderPassNames.s_ShadowCasterStr, enablePass); } + else if (material.shader.IsShaderGraph()) + { + // Shader graph generate distortion pass only if required. So we can safely enable it + // all the time here. + material.SetShaderPassEnabled(HDShaderPassNames.s_DistortionVectorsStr, true); + } if (material.HasProperty(kTransparentDepthPrepassEnable)) {