diff --git a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SurfaceOptionPropertyBlock.cs b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SurfaceOptionPropertyBlock.cs index bde3e02903f..6070ce58960 100644 --- a/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SurfaceOptionPropertyBlock.cs +++ b/com.unity.render-pipelines.high-definition/Editor/Material/ShaderGraph/SurfaceOptionPropertyBlock.cs @@ -15,14 +15,14 @@ namespace UnityEditor.Rendering.HighDefinition.ShaderGraph class SurfaceOptionPropertyBlock : SubTargetPropertyBlock { [Flags] - // TODO: remove ? public enum Features { - None = 0, - All = ~0, + None = 0, + ShowDoubleSidedNormal = 1 << 0, + All = ~0, - Unlit = All, - Lit = All, + Unlit = All ^ ShowDoubleSidedNormal, // hide double sided normal for unlit + Lit = All, } class Styles @@ -85,7 +85,10 @@ protected override void CreatePropertyGUI() AddProperty(alphaToMaskText, () => builtinData.alphaToMask, (newValue) => builtinData.alphaToMask = newValue); // Misc - AddProperty(Styles.doubleSidedModeText, () => systemData.doubleSidedMode, (newValue) => systemData.doubleSidedMode = newValue); + if ((enabledFeatures & Features.ShowDoubleSidedNormal) != 0) + AddProperty(Styles.doubleSidedModeText, () => systemData.doubleSidedMode, (newValue) => systemData.doubleSidedMode = newValue); + else + AddProperty(doubleSidedEnableText, () => systemData.doubleSidedMode != DoubleSidedMode.Disabled, (newValue) => systemData.doubleSidedMode = newValue ? DoubleSidedMode.Enabled : DoubleSidedMode.Disabled); if (lightingData != null) AddProperty(Styles.fragmentNormalSpace, () => lightingData.normalDropOffSpace, (newValue) => lightingData.normalDropOffSpace = newValue);