Skip to content

Commit

Permalink
修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfBlaze1997 committed Jul 11, 2024
1 parent ad659f2 commit 4a38076
Show file tree
Hide file tree
Showing 13 changed files with 1,860 additions and 3,284 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public enum NodeLOD
private UsageListStaticSwitchNodes m_staticSwitchNodes = new UsageListStaticSwitchNodes();

[SerializeField]
private UsageListLWGUIStaticSwitchNodes m_lwguiStaticSwitchNodes = new UsageListLWGUIStaticSwitchNodes();
private UsageListLogicalSGUIStaticSwitchNodes m_LogicalSGUIStaticSwitchNodes = new UsageListLogicalSGUIStaticSwitchNodes();

[SerializeField]
private int m_masterNodeId = Constants.INVALID_NODE_ID;
Expand Down Expand Up @@ -234,9 +234,9 @@ public void Init()
m_staticSwitchNodes = new UsageListStaticSwitchNodes();
m_staticSwitchNodes.ContainerGraph = this;
m_staticSwitchNodes.ReorderOnChange = true;
m_lwguiStaticSwitchNodes = new UsageListLWGUIStaticSwitchNodes();
m_lwguiStaticSwitchNodes.ContainerGraph = this;
m_lwguiStaticSwitchNodes.ReorderOnChange = true;
m_LogicalSGUIStaticSwitchNodes = new UsageListLogicalSGUIStaticSwitchNodes();
m_LogicalSGUIStaticSwitchNodes.ContainerGraph = this;
m_LogicalSGUIStaticSwitchNodes.ReorderOnChange = true;
m_screenColorNodes = new UsageListScreenColorNodes();
m_screenColorNodes.ContainerGraph = this;
m_screenColorNodes.ReorderOnChange = true;
Expand Down Expand Up @@ -320,7 +320,7 @@ public void UpdateRegisters()
m_rawPropertyNodes.UpdateNodeArr();
m_customExpressionsOnFunctionMode.UpdateNodeArr();
m_staticSwitchNodes.UpdateNodeArr();
m_lwguiStaticSwitchNodes.UpdateNodeArr();
m_LogicalSGUIStaticSwitchNodes.UpdateNodeArr();
m_functionInputNodes.UpdateNodeArr();
m_functionNodes.UpdateNodeArr();
m_functionOutputNodes.UpdateNodeArr();
Expand Down Expand Up @@ -428,7 +428,7 @@ public void CleanNodes()
m_rawPropertyNodes.Clear();
m_customExpressionsOnFunctionMode.Clear();
m_staticSwitchNodes.Clear();
m_lwguiStaticSwitchNodes.Clear();
m_LogicalSGUIStaticSwitchNodes.Clear();
m_functionInputNodes.Clear();
m_functionNodes.Clear();
m_functionOutputNodes.Clear();
Expand Down Expand Up @@ -644,7 +644,7 @@ public void SoftDestroy()
m_customExpressionsOnFunctionMode.Clear();

m_staticSwitchNodes.Clear();
m_lwguiStaticSwitchNodes.Clear();
m_LogicalSGUIStaticSwitchNodes.Clear();

m_functionInputNodes.Clear();
//m_functionInputNodes = null;
Expand Down Expand Up @@ -749,8 +749,8 @@ public void Destroy()
m_staticSwitchNodes.Destroy();
m_staticSwitchNodes = null;

m_lwguiStaticSwitchNodes.Destroy();
m_lwguiStaticSwitchNodes = null;
m_LogicalSGUIStaticSwitchNodes.Destroy();
m_LogicalSGUIStaticSwitchNodes = null;

m_functionInputNodes.Destroy();
m_functionInputNodes = null;
Expand Down Expand Up @@ -3996,7 +3996,7 @@ public AmplifyShaderFunction CurrentShaderFunction
public UsageListPropertyNodes RawPropertyNodes { get { return m_rawPropertyNodes; } }
public UsageListCustomExpressionsOnFunctionMode CustomExpressionOnFunctionMode { get { return m_customExpressionsOnFunctionMode; } }
public UsageListStaticSwitchNodes StaticSwitchNodes { get { return m_staticSwitchNodes; } }
public UsageListLWGUIStaticSwitchNodes LWGUIStaticSwitchNodes { get { return m_lwguiStaticSwitchNodes; } }
public UsageListLogicalSGUIStaticSwitchNodes LogicalSGUIStaticSwitchNodes { get { return m_LogicalSGUIStaticSwitchNodes; } }
public UsageListScreenColorNodes ScreenColorNodes { get { return m_screenColorNodes; } }
public UsageListRegisterLocalVarNodes LocalVarNodes { get { return m_localVarNodes; } }
public UsageListGlobalArrayNodes GlobalArrayNodes { get { return m_globalArrayNodes; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
namespace AmplifyShaderEditor
{
[Serializable]
[NodeAttributes("Static Switch LWGUI", "Logical Operators", "Creates a shader keyword toggle", Available = true)]
public sealed class LWGUIStaticSwitch : PropertyNode
[NodeAttributes("Static Switch LogicalSGUI", "Logical Operators", "Creates a shader keyword toggle", Available = true)]
public sealed class LogicalSGUIStaticSwitch : PropertyNode
{
public enum ShaderStage
{
Expand Down Expand Up @@ -91,9 +91,9 @@ public enum StaticSwitchVariableMode
private KeywordModeType m_keywordModeType = KeywordModeType.LogicalSubToggle;

[SerializeField]
private LWGUIStaticSwitch m_reference = null;
private LogicalSGUIStaticSwitch m_reference = null;

private const string StaticSwitchStr = "Static Switch LWGUI";
private const string StaticSwitchStr = "Static Switch LogicalSGUI";
private const string MaterialToggleStr = "Material Toggle";

private const string ToggleMaterialValueStr = "Material Value";
Expand Down Expand Up @@ -169,7 +169,7 @@ public override void SetPreviewInputs()
if (m_conditionId == -1)
m_conditionId = Shader.PropertyToID("_Condition");

LWGUIStaticSwitch node = (m_staticSwitchVarMode == StaticSwitchVariableMode.Reference && m_reference != null) ? m_reference : this;
LogicalSGUIStaticSwitch node = (m_staticSwitchVarMode == StaticSwitchVariableMode.Reference && m_reference != null) ? m_reference : this;

if (m_createToggle)
PreviewMaterial.SetInt(m_conditionId, node.MaterialValue);
Expand All @@ -188,11 +188,11 @@ protected override void OnUniqueIDAssigned()

if (CurrentVarMode != StaticSwitchVariableMode.Reference)
{
ContainerGraph.LWGUIStaticSwitchNodes.AddNode(this);
ContainerGraph.LogicalSGUIStaticSwitchNodes.AddNode(this);
}

if (UniqueId > -1)
ContainerGraph.LWGUIStaticSwitchNodes.OnReorderEventComplete += OnReorderEventComplete;
ContainerGraph.LogicalSGUIStaticSwitchNodes.OnReorderEventComplete += OnReorderEventComplete;
}

public override void Destroy()
Expand All @@ -201,11 +201,11 @@ public override void Destroy()
UIUtils.UnregisterPropertyNode(this);
if (CurrentVarMode != StaticSwitchVariableMode.Reference)
{
ContainerGraph.LWGUIStaticSwitchNodes.RemoveNode(this);
ContainerGraph.LogicalSGUIStaticSwitchNodes.RemoveNode(this);
}

if (UniqueId > -1)
ContainerGraph.LWGUIStaticSwitchNodes.OnReorderEventComplete -= OnReorderEventComplete;
ContainerGraph.LogicalSGUIStaticSwitchNodes.OnReorderEventComplete -= OnReorderEventComplete;
}

void OnReorderEventComplete()
Expand All @@ -214,7 +214,7 @@ void OnReorderEventComplete()
{
if (m_reference != null)
{
m_referenceArrayId = ContainerGraph.LWGUIStaticSwitchNodes.GetNodeRegisterIdx(m_reference.UniqueId);
m_referenceArrayId = ContainerGraph.LogicalSGUIStaticSwitchNodes.GetNodeRegisterIdx(m_reference.UniqueId);
}
}
}
Expand Down Expand Up @@ -376,7 +376,7 @@ private string GetKeywordEnumPropertyList()
}
return result;
}
private string GetKeywordEnumPropertyList_LWGUI()
private string GetKeywordEnumPropertyList_LogicalSGUI()
{
string result = string.Empty;
for (int i = 0; i < m_keywordEnumList.Length; i++)
Expand Down Expand Up @@ -529,7 +529,7 @@ void PropertyGroup()
}
else if (CurrentVarMode == StaticSwitchVariableMode.Reference)
{
string[] arr = ContainerGraph.LWGUIStaticSwitchNodes.NodesArr;
string[] arr = ContainerGraph.LogicalSGUIStaticSwitchNodes.NodesArr;
bool guiEnabledBuffer = GUI.enabled;
if (arr != null && arr.Length > 0)
{
Expand All @@ -545,7 +545,7 @@ void PropertyGroup()
m_referenceArrayId = EditorGUILayoutPopup(Constants.AvailableReferenceStr, m_referenceArrayId, arr);
if (EditorGUI.EndChangeCheck())
{
m_reference = ContainerGraph.LWGUIStaticSwitchNodes.GetNode(m_referenceArrayId);
m_reference = ContainerGraph.LogicalSGUIStaticSwitchNodes.GetNode(m_referenceArrayId);
if (m_reference != null)
{
m_referenceNodeId = m_reference.UniqueId;
Expand Down Expand Up @@ -681,7 +681,7 @@ public override void CheckPropertyFromInspector(bool forceUpdate = false)

if (CurrentVarMode != StaticSwitchVariableMode.Reference)
{
ContainerGraph.LWGUIStaticSwitchNodes.UpdateDataOnNode(UniqueId, DataToArray);
ContainerGraph.LogicalSGUIStaticSwitchNodes.UpdateDataOnNode(UniqueId, DataToArray);
}
}
}
Expand Down Expand Up @@ -749,8 +749,8 @@ void CheckReferenceValues(bool forceUpdate)
{
if (m_reference == null && m_referenceNodeId > 0)
{
m_reference = ContainerGraph.GetNode(m_referenceNodeId) as LWGUIStaticSwitch;
m_referenceArrayId = ContainerGraph.LWGUIStaticSwitchNodes.GetNodeRegisterIdx(m_referenceNodeId);
m_reference = ContainerGraph.GetNode(m_referenceNodeId) as LogicalSGUIStaticSwitch;
m_referenceArrayId = ContainerGraph.LogicalSGUIStaticSwitchNodes.GetNodeRegisterIdx(m_referenceNodeId);
}

if (m_reference != null)
Expand Down Expand Up @@ -884,7 +884,7 @@ private string OnOffStr
if (!m_lockKeyword)
return string.Empty;

LWGUIStaticSwitch node = null;
LogicalSGUIStaticSwitch node = null;
switch (CurrentVarMode)
{
default:
Expand Down Expand Up @@ -979,7 +979,7 @@ public override string GenerateShaderForOutput(int outputId, ref MasterNodeDataC

base.GenerateShaderForOutput(outputId, ref dataCollector, ignoreLocalvar);

LWGUIStaticSwitch node = (m_staticSwitchVarMode == StaticSwitchVariableMode.Reference && m_reference != null) ? m_reference : this;
LogicalSGUIStaticSwitch node = (m_staticSwitchVarMode == StaticSwitchVariableMode.Reference && m_reference != null) ? m_reference : this;

this.OrderIndex = node.RawOrderIndex;
this.OrderIndexOffset = node.OrderIndexOffset;
Expand Down Expand Up @@ -1226,7 +1226,7 @@ public override void ReadFromString(ref string[] nodeParams)

if (!m_isNodeBeingCopied && CurrentVarMode != StaticSwitchVariableMode.Reference)
{
ContainerGraph.LWGUIStaticSwitchNodes.UpdateDataOnNode(UniqueId, DataToArray);
ContainerGraph.LogicalSGUIStaticSwitchNodes.UpdateDataOnNode(UniqueId, DataToArray);
}
}

Expand Down Expand Up @@ -1317,7 +1317,7 @@ StaticSwitchVariableMode CurrentVarMode
{
if (value == StaticSwitchVariableMode.Reference)
{
ContainerGraph.LWGUIStaticSwitchNodes.RemoveNode(this);
ContainerGraph.LogicalSGUIStaticSwitchNodes.RemoveNode(this);
m_referenceArrayId = -1;
m_referenceNodeId = -1;
m_reference = null;
Expand All @@ -1326,7 +1326,7 @@ StaticSwitchVariableMode CurrentVarMode
else
{
m_headerColorModifier = Color.white;
ContainerGraph.LWGUIStaticSwitchNodes.AddNode(this);
ContainerGraph.LogicalSGUIStaticSwitchNodes.AddNode(this);
UpdateLabels();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace AmplifyShaderEditor
[Serializable] public class UsageListCustomExpressionsOnFunctionMode : NodeUsageRegister<CustomExpressionNode> { }
[Serializable] public class UsageListGlobalArrayNodes : NodeUsageRegister<GlobalArrayNode> { }
[Serializable] public class UsageListStaticSwitchNodes : NodeUsageRegister<StaticSwitch> { }
[Serializable] public class UsageListLWGUIStaticSwitchNodes : NodeUsageRegister<LWGUIStaticSwitch> { }
[Serializable] public class UsageListLogicalSGUIStaticSwitchNodes : NodeUsageRegister<LogicalSGUIStaticSwitch> { }

[Serializable]
public class NodeUsageRegister<T> where T : ParentNode
Expand Down
6 changes: 5 additions & 1 deletion Assets/Plugins/EXLitShader/EXLitShaderASE.mat
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ Material:
- _PARALLAXMAP_OFF
- _SAMPLE_COMMON
- _SHADER_PBR
- _USE_PARALLAXMAP_PARALLAX
- _WINDQUALITY_NONE
m_InvalidKeywords:
- ' '
- PLANT_SENIOR_DISABLE_DETAILGROUP0_DISABLE_CLEARCOATGROUP_DISABLE_PARALLAXGROUP0
- ShaderModelGroup1, _OCCLUSION
- ShaderModelGroup1_SENIOR
- _
Expand All @@ -31,7 +33,6 @@ Material:
- _SENIOR
- _STENCIL
- _SURFACEOPTIONS
- _USE_PARALLAXMAP_PARALLAX
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
Expand Down Expand Up @@ -128,10 +129,13 @@ Material:
- ExtraMixMap_Display: 0
- FlipBackNormal_On: 0
- FlipBackNormal_On1: 0
- HoudiniVATGroup0: 0
- NoiseSource_Enum: 0
- Occlusion_On: 1
- ParallaxGroup0: 0
- ParallaxSource_Enum: 0
- Sample_Enum: 0
- ShaderModelGroup1: 1
- WindEnabled_Enum: 0
- _AlphaCutoff: 0.5
- _AnimatorStrength: 1
Expand Down
Loading

0 comments on commit 4a38076

Please sign in to comment.