Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down