diff --git a/Editor/Helper/LwguiSettingsProvider.cs b/Editor/Helper/LwguiSettingsProvider.cs new file mode 100644 index 0000000..13c9a36 --- /dev/null +++ b/Editor/Helper/LwguiSettingsProvider.cs @@ -0,0 +1,77 @@ +// Copyright (c) Jason Ma +// LWGUI - Project Settings Provider +// Provides a toggle in Project Settings > LWGUI to enable/disable ASE integration. + +using System.Collections.Generic; +using System.Linq; +using UnityEditor; +using UnityEngine; + +namespace LWGUI +{ + public static class LwguiSettingsProvider + { + private const string Symbol = "LWGUI_ASE_INTEGRATION"; + private const string SettingsPath = "Project/LWGUI"; + + [SettingsProvider] + static SettingsProvider CreateLwguiSettingsProvider() + { + var provider = new SettingsProvider( SettingsPath, SettingsScope.Project ) + { + label = "LWGUI", + keywords = new HashSet { "LWGUI", "ASE", "Amplify", "Integration" }, + guiHandler = DrawGUI + }; + return provider; + } + + private static void DrawGUI( string searchContext ) + { + var target = EditorUserBuildSettings.selectedBuildTargetGroup; + PlayerSettings.GetScriptingDefineSymbolsForGroup( target, out string[] defines ); + var definesList = defines.ToList(); + + bool isEnabled = definesList.Contains( Symbol ); + + EditorGUILayout.Space(); + EditorGUILayout.LabelField( "Third-Party Integration", EditorStyles.boldLabel ); + + if ( isEnabled ) + { + EditorGUILayout.HelpBox( + "ASE Integration is enabled. LWGUI Drawer/Decorator attributes " + + "are available in Amplify Shader Editor property nodes.\n" + + "Requires Amplify Shader Editor v1.9.9.10+.", + MessageType.Info ); + } + else + { + EditorGUILayout.HelpBox( + "ASE Integration is disabled. Enable it to add LWGUI Drawer/Decorator " + + "selection to Amplify Shader Editor property nodes.\n" + + "Requires Amplify Shader Editor v1.9.9.10+.", + MessageType.None ); + } + + EditorGUI.BeginChangeCheck(); + bool newValue = EditorGUILayout.Toggle( + new GUIContent( "ASE Integration", + "Enable Amplify Shader Editor integration.\n" + + "Adds LWGUI Drawer/Decorator selection to ASE property nodes.\n" + + "Requires Amplify Shader Editor v1.9.9.10+ to be installed.\n" + + "Triggers a domain recompile when changed." ), + isEnabled ); + + if ( EditorGUI.EndChangeCheck() && newValue != isEnabled ) + { + if ( newValue ) + definesList.Add( Symbol ); + else + definesList.Remove( Symbol ); + + PlayerSettings.SetScriptingDefineSymbolsForGroup( target, definesList.ToArray() ); + } + } + } +} diff --git a/Editor/Helper/LwguiSettingsProvider.cs.meta b/Editor/Helper/LwguiSettingsProvider.cs.meta new file mode 100644 index 0000000..ab0e099 --- /dev/null +++ b/Editor/Helper/LwguiSettingsProvider.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 05f5dc798773d04469d1df7efb760f83 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/ScriptableObject/LwguiRampAtlas.cs b/Editor/ScriptableObject/LwguiRampAtlas.cs index e4dface..9b5b5fd 100644 --- a/Editor/ScriptableObject/LwguiRampAtlas.cs +++ b/Editor/ScriptableObject/LwguiRampAtlas.cs @@ -131,7 +131,6 @@ public partial class LwguiRampAtlas : ScriptableObject private string _rampAtlasSOPath = string.Empty; private string _rampAtlasTexturePath = string.Empty; - [SerializeField] private bool _saveTextureToggle; [SerializeField] private List _ramps = new List(); [NonSerialized] public Texture2D rampAtlasTexture = null; @@ -346,30 +345,20 @@ private void OnEnable() LoadTexture(); } - private void UserSaveTexture() + /// + /// Explicitly save texture with P4 checkout. Only call from user-initiated actions (e.g. Save button). + /// + public void SaveTextureWithCheckout() { - // It is only called when the user manually saves it, avoiding some strange bugs - if (!_saveTextureToggle) - return; - InitData(); if (!LoadTexture()) return; UpdateTexturePixels(); - SaveTexture(checkoutAndForceWrite:_saveTextureToggle); - _saveTextureToggle = false; + SaveTexture(checkoutAndForceWrite: true); } - private void OnValidate() - { - // Avoid calling when opening a material, otherwise it will cause P4 communication problems - EditorApplication.delayCall -= UserSaveTexture; - EditorApplication.delayCall += UserSaveTexture; - } - - #region Static public static Texture LoadRampAtlasTexture(LwguiRampAtlas rampAtlasSO) diff --git a/Editor/ScriptableObject/LwguiRampAtlasEditor.cs b/Editor/ScriptableObject/LwguiRampAtlasEditor.cs new file mode 100644 index 0000000..a8fa74d --- /dev/null +++ b/Editor/ScriptableObject/LwguiRampAtlasEditor.cs @@ -0,0 +1,55 @@ +// Copyright (c) Jason Ma + +using UnityEditor; +using UnityEngine; + +namespace LWGUI +{ + [CustomEditor(typeof(LwguiRampAtlas), true)] + public class LwguiRampAtlasEditor : Editor + { + public override void OnInspectorGUI() + { + ForceExpandAllListElements(); + + DrawDefaultInspector(); + + EditorGUILayout.Space(); + + var rampAtlas = (LwguiRampAtlas)target; + + if (rampAtlas.TotalRowCount > rampAtlas.rampAtlasHeight) + { + EditorGUILayout.HelpBox( + $"Atlas height ({rampAtlas.rampAtlasHeight}) is less than total row count ({rampAtlas.TotalRowCount}). " + + "Please increase the height before saving.", + MessageType.Warning); + } + + using (new EditorGUI.DisabledScope(!AssetDatabase.Contains(rampAtlas))) + { + if (GUILayout.Button("Save Ramp Atlas Texture", GUILayout.Height(30))) + { + rampAtlas.SaveTextureWithCheckout(); + } + } + } + + private void ForceExpandAllListElements() + { + var iter = serializedObject.GetIterator(); + bool enterChildren = true; + while (iter.NextVisible(enterChildren)) + { + enterChildren = true; + if (!iter.isArray || iter.propertyType != SerializedPropertyType.Generic || !iter.isExpanded) + continue; + + for (int i = 0; i < iter.arraySize; i++) + iter.GetArrayElementAtIndex(i).isExpanded = true; + + enterChildren = false; + } + } + } +} diff --git a/Editor/ScriptableObject/LwguiRampAtlasEditor.cs.meta b/Editor/ScriptableObject/LwguiRampAtlasEditor.cs.meta new file mode 100644 index 0000000..ba065d7 --- /dev/null +++ b/Editor/ScriptableObject/LwguiRampAtlasEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 54b375a03a61e6f49aa692dccb25a860 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/ShaderDrawers/BasicDrawers/SubDrawer.cs b/Editor/ShaderDrawers/BasicDrawers/SubDrawer.cs index 7c22497..a085638 100644 --- a/Editor/ShaderDrawers/BasicDrawers/SubDrawer.cs +++ b/Editor/ShaderDrawers/BasicDrawers/SubDrawer.cs @@ -32,7 +32,9 @@ public SubDrawer(string group) protected virtual float GetVisibleHeight(MaterialProperty prop) { var height = MaterialEditor.GetDefaultPropertyHeight(prop); - return prop.GetPropertyType() == ShaderPropertyType.Vector ? EditorGUIUtility.singleLineHeight : height; + if (prop.GetPropertyType() == ShaderPropertyType.Vector) + return string.IsNullOrEmpty(prop.displayName) ? EditorGUIUtility.singleLineHeight : EditorGUIUtility.singleLineHeight * 2; + return height; } public virtual void BuildStaticMetaData(Shader inShader, MaterialProperty inProp, MaterialProperty[] inProps, PropertyStaticData inoutPropertyStaticData) diff --git a/Editor/ShaderDrawers/ExtraDrawers/Numeric/BitMaskDrawer.cs b/Editor/ShaderDrawers/ExtraDrawers/Numeric/BitMaskDrawer.cs index b0eb35e..2b401df 100644 --- a/Editor/ShaderDrawers/ExtraDrawers/Numeric/BitMaskDrawer.cs +++ b/Editor/ShaderDrawers/ExtraDrawers/Numeric/BitMaskDrawer.cs @@ -105,20 +105,25 @@ public BitMaskDrawer(string group, List bitDescriptions) public override bool IsMatchPropType(ShaderPropertyType propType) => propType is ShaderPropertyType.Float or ShaderPropertyType.Int; - protected override float GetVisibleHeight(MaterialProperty prop) { return maxHeight; } + protected override float GetVisibleHeight(MaterialProperty prop) + { + return string.IsNullOrEmpty(prop.displayName) ? EditorGUIUtility.singleLineHeight : maxHeight; + } public override void DrawProp(Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor) { - label.tooltip += $"\nCurrent Value: { prop.GetNumericValue() }"; + bool hasLabel = !string.IsNullOrEmpty(label.text); + if (hasLabel) + label.tooltip += $"\nCurrent Value: { prop.GetNumericValue() }"; int controlId = GUIUtility.GetControlID(_hint, FocusType.Keyboard, position); var fieldRect = EditorGUI.PrefixLabel(position, controlId, label); - var needSecondRow = totalButtonWidth > fieldRect.width; - var scale = needSecondRow ? position.width / totalButtonWidth : fieldRect.width / totalButtonWidth; + var needSecondRow = hasLabel && totalButtonWidth > fieldRect.width; + var scale = needSecondRow ? (position.width - ReflectionHelper.EditorGUI_indent) / totalButtonWidth : fieldRect.width / totalButtonWidth; if (needSecondRow) - fieldRect = new Rect(position.x + ReflectionHelper.EditorGUI_indent, position.y + EditorGUIUtility.singleLineHeight, position.width, maxHeight - EditorGUIUtility.singleLineHeight); + fieldRect = new Rect(position.x + ReflectionHelper.EditorGUI_indent, position.y + EditorGUIUtility.singleLineHeight, position.width - ReflectionHelper.EditorGUI_indent, maxHeight - EditorGUIUtility.singleLineHeight); fieldRect.xMin = fieldRect.xMax; diff --git a/Editor/ShaderDrawers/ExtraDrawers/Ramp/RampAtlasIndexerDrawer.cs b/Editor/ShaderDrawers/ExtraDrawers/Ramp/RampAtlasIndexerDrawer.cs index dd7ff04..d54d7e1 100644 --- a/Editor/ShaderDrawers/ExtraDrawers/Ramp/RampAtlasIndexerDrawer.cs +++ b/Editor/ShaderDrawers/ExtraDrawers/Ramp/RampAtlasIndexerDrawer.cs @@ -21,6 +21,12 @@ namespace LWGUI /// Target Property Type: Float /// [LwguiDrawerCategory("Ramp")] + [LwguiDrawerParameterString("group", "")] + [LwguiDrawerParameterString("rampAtlasPropName", "")] + [LwguiDrawerParameterString("defaultRampName", "Ramp")] + [LwguiDrawerParameterEnum("colorSpace", 0, "sRGB", "Linear")] + [LwguiDrawerParameterEnum("viewChannelMask", 0, "RGBA", "RGB", "R", "G", "B", "A")] + [LwguiDrawerParameterEnum("timeRange", 0, "1", "24", "2400")] public class RampAtlasIndexerDrawer : RampDrawer { public string rampAtlasPropName = string.Empty; diff --git a/Editor/ShaderDrawers/ExtraDrawers/Texture/TexDrawer.cs b/Editor/ShaderDrawers/ExtraDrawers/Texture/TexDrawer.cs index 5b00deb..db97fec 100644 --- a/Editor/ShaderDrawers/ExtraDrawers/Texture/TexDrawer.cs +++ b/Editor/ShaderDrawers/ExtraDrawers/Texture/TexDrawer.cs @@ -40,6 +40,8 @@ public override void BuildStaticMetaData(Shader inShader, MaterialProperty inPro { base.BuildStaticMetaData(inShader, inProp, inProps, inoutPropertyStaticData); inoutPropertyStaticData.AddExtraProperty(_extraPropName); + inoutPropertyStaticData.labelWidth = Mathf.Max(inoutPropertyStaticData.labelWidth, + EditorStyles.label.CalcSize(new GUIContent(inoutPropertyStaticData.displayName)).x + 32f); } public override void GetDefaultValueDescription(Shader inShader, MaterialProperty inProp, MaterialProperty inDefaultProp, PerShaderData inPerShaderData, PerMaterialData inoutPerMaterialData) diff --git a/Editor/ShaderDrawers/ExtraDrawers/Vector/ChannelDrawer.cs b/Editor/ShaderDrawers/ExtraDrawers/Vector/ChannelDrawer.cs index 83ebeac..85421c7 100644 --- a/Editor/ShaderDrawers/ExtraDrawers/Vector/ChannelDrawer.cs +++ b/Editor/ShaderDrawers/ExtraDrawers/Vector/ChannelDrawer.cs @@ -53,6 +53,8 @@ public ChannelDrawer(string group) public override bool IsMatchPropType(ShaderPropertyType propType) { return propType == ShaderPropertyType.Vector; } + protected override float GetVisibleHeight(MaterialProperty prop) => EditorGUIUtility.singleLineHeight; + private static int GetChannelIndex(MaterialProperty prop) { int index = -1; diff --git a/Editor/ShaderDrawers/ExtraDrawers/Vector/ColorDrawer.cs b/Editor/ShaderDrawers/ExtraDrawers/Vector/ColorDrawer.cs index 46074f4..368a0e2 100644 --- a/Editor/ShaderDrawers/ExtraDrawers/Vector/ColorDrawer.cs +++ b/Editor/ShaderDrawers/ExtraDrawers/Vector/ColorDrawer.cs @@ -10,7 +10,7 @@ namespace LWGUI { /// /// Display up to 4 colors in a single line - /// + /// /// group: parent group name (Default: none) /// color2-4: extra color property name /// Target Property Type: Color @@ -18,7 +18,8 @@ namespace LWGUI [LwguiDrawerCategory("Vector")] public class ColorDrawer : SubDrawer { - private string[] _colorStrings = new string[3]; + private string[] _colorStrings = new string[3]; + private static readonly float _minColorWidth = 50f; public ColorDrawer(string group, string color2) : this(group, color2, String.Empty, String.Empty) { } @@ -43,6 +44,30 @@ public override void BuildStaticMetaData(Shader inShader, MaterialProperty inPro } } + private int GetColorCount(MaterialProperty prop, LWGUIMetaDatas inMetaDatas) + { + if (inMetaDatas == null) + return 1; + + int count = 1; + foreach (var colorPropName in _colorStrings) + { + if (string.IsNullOrEmpty(colorPropName)) + continue; + var p = inMetaDatas.GetProperty(colorPropName); + if (p != null && IsMatchPropType(p.GetPropertyType())) + count++; + } + return count; + } + + public override float GetPropertyHeight(MaterialProperty prop, string label, MaterialEditor editor) + { + var lwgui = editor != null ? Helper.GetLWGUI(editor) : null; + var count = GetColorCount(prop, lwgui?.metaDatas); + return count >= 3 ? EditorGUIUtility.singleLineHeight * 2 : EditorGUIUtility.singleLineHeight; + } + public override void DrawProp(Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor) { var cProps = new Stack(); @@ -64,10 +89,20 @@ public override void DrawProp(Rect position, MaterialProperty prop, GUIContent l int controlId = GUIUtility.GetControlID(FocusType.Keyboard, position); var fieldRect = EditorGUI.PrefixLabel(position, controlId, label); - + var spacing = 2f; + // Similar to BitMaskDrawer: when each color is too narrow (< _minColorWidth), move all of them to the second row. + var needSecondRow = count >= 3 && (fieldRect.width - spacing * (count - 1)) / count < _minColorWidth; + if (needSecondRow) + fieldRect = new Rect(position.x + ReflectionHelper.EditorGUI_indent, + position.y + EditorGUIUtility.singleLineHeight, + position.width - ReflectionHelper.EditorGUI_indent, + EditorGUIUtility.singleLineHeight); + else + fieldRect.height = EditorGUIUtility.singleLineHeight; + var colorWidth = (fieldRect.width - spacing * (count - 1)) / count; - + var indentLevel = EditorGUI.indentLevel; EditorGUI.indentLevel = 0; @@ -88,7 +123,7 @@ public override void DrawProp(Rect position, MaterialProperty prop, GUIContent l cProp.colorValue = dst; } } - + EditorGUI.indentLevel = indentLevel; EditorGUI.showMixedValue = false; } diff --git a/Editor/ThirdParty/AmplifyShaderEditorBridge.meta b/Editor/ThirdParty/AmplifyShaderEditorBridge.meta new file mode 100644 index 0000000..59905d8 --- /dev/null +++ b/Editor/ThirdParty/AmplifyShaderEditorBridge.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e67542265f3d4ed41931e316de2328e5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/ThirdParty/AmplifyShaderEditorBridge/LWGUI.AmplifyShaderEditorBridge.asmdef b/Editor/ThirdParty/AmplifyShaderEditorBridge/LWGUI.AmplifyShaderEditorBridge.asmdef new file mode 100644 index 0000000..582cef9 --- /dev/null +++ b/Editor/ThirdParty/AmplifyShaderEditorBridge/LWGUI.AmplifyShaderEditorBridge.asmdef @@ -0,0 +1,21 @@ +{ + "name": "LWGUI.AmplifyShaderEditorBridge", + "rootNamespace": "LWGUI", + "references": [ + "AmplifyShaderEditor", + "LWGUI" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [ + "LWGUI_ASE_INTEGRATION" + ], + "versionDefines": [], + "noEngineReferences": false +} diff --git a/Editor/ThirdParty/AmplifyShaderEditorBridge/LWGUI.AmplifyShaderEditorBridge.asmdef.meta b/Editor/ThirdParty/AmplifyShaderEditorBridge/LWGUI.AmplifyShaderEditorBridge.asmdef.meta new file mode 100644 index 0000000..5f20110 --- /dev/null +++ b/Editor/ThirdParty/AmplifyShaderEditorBridge/LWGUI.AmplifyShaderEditorBridge.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1bdbb698c2c983346bb55e04db66d9fb +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiExtensionHelper.cs b/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiExtensionHelper.cs new file mode 100644 index 0000000..764da98 --- /dev/null +++ b/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiExtensionHelper.cs @@ -0,0 +1,1242 @@ +// Copyright (c) Jason Ma +// LWGUI - Amplify Shader Editor Extension Helper +// Provides UI drawing and attribute generation for the LWGUI bridge. +// This file is only compiled when LWGUI_ASE_INTEGRATION is defined. + +#if LWGUI_ASE_INTEGRATION + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using AmplifyShaderEditor; +using UnityEditor; +using UnityEditorInternal; +using UnityEngine; +using UnityEngine.Rendering; + +namespace LWGUI +{ + /// + /// Helper class for LWGUI integration in ASE + /// Provides UI drawing methods that call into LWGUI core functionality + /// + public static class LwguiExtensionHelper + { + private static GUIContent s_helpIconContent; + private static GUIStyle _lwguiPopupStyle; + private static bool _lastProSkin; + + /// + /// Returns a text color for placeholder/default values that works on the current editor skin. + /// + private static Color GetPlaceholderContentColor() + { + return EditorGUIUtility.isProSkin + ? new Color(0.65f, 0.65f, 0.65f, 1f) + : new Color(0.35f, 0.35f, 0.35f, 0.5f); + } + + /// + /// Returns a popup style suitable for the current editor skin. + /// The ASE InspectorPopdropdownStyle is based on PopupCurveDropdown and uses a light text + /// color that is invisible in light themes, so we override the text colors in that case. + /// + private static GUIStyle GetLwguiPopupStyle() + { + bool isProSkin = EditorGUIUtility.isProSkin; + if (_lwguiPopupStyle == null || _lastProSkin != isProSkin) + { + GUIStyle baseStyle = UIUtils.InspectorPopdropdownStyle ?? EditorStyles.popup; + _lwguiPopupStyle = new GUIStyle(baseStyle); + // ASE's InspectorPopdropdownStyle is based on PopupCurveDropdown, whose text is drawn + // slightly higher than EditorGUILayout.LabelField. Shift it down to align both sides. + _lwguiPopupStyle.contentOffset = new Vector2(0, 2); + // The dropdown arrow is part of the background image and unaffected by contentOffset. + // Shift the background down by 3 pixels so the arrow aligns with the text. + RectOffset overflow = _lwguiPopupStyle.overflow; + overflow.top -= 3; + overflow.bottom += 3; + _lwguiPopupStyle.overflow = overflow; + + if (!isProSkin) + _lwguiPopupStyle.normal.textColor = EditorStyles.popup.normal.textColor; + + _lastProSkin = isProSkin; + } + + return _lwguiPopupStyle; + } + + #region Public API - Called from PropertyNode + + public static void DrawLwguiDrawerSection( + LwguiAttributeData drawerData, + ref bool foldoutState, + Action onChanged, + PropertyNode propertyNode = null) + { + // Ensure data is validated before drawing + drawerData.ValidateAndRepair(); + + DrawFoldoutSection("LWGUI Drawer Attribute", "https://github.com/JasonMa0012/LWGUI#extra-drawers", ref foldoutState, () => + { + string displayName = string.IsNullOrEmpty(drawerData.drawerTypeName) ? "None" : drawerData.drawerTypeName; + GUIStyle popupStyle = GetLwguiPopupStyle(); + + EditorGUILayout.BeginHorizontal(); + { + EditorGUILayout.LabelField("Type", GUILayout.Width(EditorGUIUtility.labelWidth - 4)); + + if (GUILayout.Button(displayName, popupStyle, GUILayout.ExpandWidth(true))) + { + ShowDrawerOnlySelectionMenu(drawerData, onChanged, GetPropertyShaderType(propertyNode)); + } + } + EditorGUILayout.EndHorizontal(); + + if (!string.IsNullOrEmpty(drawerData.drawerTypeName)) + { + // Show constructor selection if multiple constructors available + var drawerInfo = LwguiDrawerDiscovery.GetDrawerInfo(drawerData.drawerTypeName); + if (drawerInfo != null && drawerInfo.constructors.Count > 1) + { + EditorGUILayout.BeginHorizontal(); + { + EditorGUILayout.LabelField("Constructor", GUILayout.Width(EditorGUIUtility.labelWidth - 4)); + + var constructorInfo = drawerData.GetCurrentConstructor(); + int currentIndex = drawerInfo.constructors.IndexOf(constructorInfo) + 1; + int totalCount = drawerInfo.constructors.Count; + string constructorDisplayName = $"({currentIndex} / {totalCount})"; + + if (GUILayout.Button(constructorDisplayName, popupStyle, GUILayout.ExpandWidth(true))) + { + ShowConstructorSelectionMenu(drawerData, drawerInfo, onChanged); + } + } + EditorGUILayout.EndHorizontal(); + } + + DrawParametersForAttribute(drawerData, onChanged, propertyNode); + } + }, menu => PopulateDrawerContextMenu(menu, drawerData, onChanged)); + } + + public static void DrawLwguiDecoratorsSection( + List decorators, + ref bool foldoutState, + Action onChanged, + PropertyNode propertyNode, + ref ReorderableList reorderableList) + { + var list = reorderableList; + if (list == null || list.list != decorators) + { + list = new ReorderableList(decorators, typeof(LwguiAttributeData), true, false, true, true) + { + headerHeight = 0, + footerHeight = 0, + showDefaultBackground = true, + + elementHeightCallback = index => + { + if (index < 0 || index >= decorators.Count) + return EditorGUIUtility.singleLineHeight + 4; + + var attr = decorators[index]; + // Ensure data is validated + attr.ValidateAndRepair(); + + // Base height for Type label + dropdown + float baseHeight = EditorGUIUtility.singleLineHeight + 4; + + if (!string.IsNullOrEmpty(attr.drawerTypeName)) + { + var drawerInfo = LwguiDrawerDiscovery.GetDrawerInfo(attr.drawerTypeName); + + // Add height for Constructor label + dropdown if multiple constructors + if (drawerInfo != null && drawerInfo.constructors.Count > 1) + { + baseHeight += EditorGUIUtility.singleLineHeight + 4; + } + + // Add height for parameters + var constructorInfo = attr.GetCurrentConstructor(); + if (constructorInfo != null && constructorInfo.parameters.Count > 0) + baseHeight += constructorInfo.parameters.Count * (EditorGUIUtility.singleLineHeight + 2); + } + + return baseHeight; + }, + + drawElementCallback = (rect, index, isActive, isFocused) => + { + if (index < 0 || index >= decorators.Count) + return; + + DrawDecoratorElementUI(rect, decorators[index], index, isActive, isFocused, onChanged, propertyNode); + }, + + onReorderCallback = _ => onChanged?.Invoke(), + + onAddCallback = _ => + { + decorators.Add(new LwguiAttributeData()); + onChanged?.Invoke(); + }, + + onRemoveCallback = list => + { + if (list.index >= 0 && list.index < decorators.Count) + { + decorators.RemoveAt(list.index); + if (list.index >= decorators.Count && decorators.Count > 0) + list.index = decorators.Count - 1; + onChanged?.Invoke(); + } + } + }; + reorderableList = list; + } + + DrawFoldoutSection("LWGUI Decorator Attributes", "https://github.com/JasonMa0012/LWGUI#extra-decorators", ref foldoutState, () => + { + float totalHeight = list.GetHeight() + EditorGUIUtility.singleLineHeight; + Rect listRect = EditorGUILayout.GetControlRect(false, totalHeight); + list.DoList(listRect); + }, menu => PopulateDecoratorsContextMenu(menu, decorators, onChanged)); + } + + public static List CollectExistingParameterValues(PropertyNode currentNode, string paramName, string paramType) + { + var values = new HashSet(); + + if (currentNode?.ContainerGraph?.AllNodes == null) + return values.ToList(); + + foreach (var node in currentNode.ContainerGraph.AllNodes) + { + if (!(node is PropertyNode propertyNode)) continue; + + var nodeData = LwguiPropertyNodeExtension.GetData(propertyNode); + + if (nodeData.drawer != null && !string.IsNullOrEmpty(nodeData.drawer.drawerTypeName)) + CollectValuesFromAttribute(nodeData.drawer, paramName, paramType, values); + + if (nodeData.decorators != null) + { + foreach (var decorator in nodeData.decorators) + { + if (!string.IsNullOrEmpty(decorator.drawerTypeName)) + CollectValuesFromAttribute(decorator, paramName, paramType, values); + } + } + } + + return values.OrderBy(v => v).ToList(); + } + + public static string GenerateAttributesString(LwguiAttributeData drawer, List decorators) + { + var result = new StringBuilder(); + + if (drawer != null && !string.IsNullOrEmpty(drawer.drawerTypeName)) + { + string attr = drawer.GenerateAttributeString(); + if (!string.IsNullOrEmpty(attr)) result.Append(attr); + } + + if (decorators != null) + { + foreach (var d in decorators) + { + if (!string.IsNullOrEmpty(d.drawerTypeName)) + { + string attr = d.GenerateAttributeString(); + if (!string.IsNullOrEmpty(attr)) result.Append(attr); + } + } + } + + return result.ToString(); + } + + private static ShaderPropertyType? GetPropertyShaderType(PropertyNode propertyNode) + { + if (propertyNode == null) return null; + + var nodeType = propertyNode.GetType(); + + if (nodeType.Name == "RangedFloatNode") + { + var floatModeField = nodeType.GetField("m_floatMode", BindingFlags.Instance | BindingFlags.NonPublic); + if (floatModeField != null && !(bool)floatModeField.GetValue(propertyNode)) + return ShaderPropertyType.Range; + return ShaderPropertyType.Float; + } + + if (nodeType.Name == "IntNode") + { + var intModeField = nodeType.GetField("m_intMode", BindingFlags.Instance | BindingFlags.NonPublic); + if (intModeField != null && !(bool)intModeField.GetValue(propertyNode)) + return ShaderPropertyType.Range; + return ShaderPropertyType.Int; + } + + if (nodeType.Name == "ColorNode") return ShaderPropertyType.Color; + if (nodeType.Name == "Vector4Node" || nodeType.Name == "Vector3Node" || nodeType.Name == "Vector2Node") + return ShaderPropertyType.Vector; + if (nodeType.Name == "TexturePropertyNode" || nodeType.Name == "TextureArrayNode") + return ShaderPropertyType.Texture; + + return null; + } + + #endregion + + #region Private Implementation - Parameter Drawing + + private static void DrawParametersForAttribute(LwguiAttributeData attributeData, Action onChanged, PropertyNode propertyNode = null) + { + var constructorInfo = attributeData.GetCurrentConstructor(); + if (constructorInfo == null || constructorInfo.parameters.Count == 0) return; + + for (int i = 0; i < constructorInfo.parameters.Count; i++) + { + var param = constructorInfo.parameters[i]; + + while (attributeData.parameters.Count <= i) + attributeData.parameters.Add(""); + + Rect totalRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight); + DrawSingleParameterUI(totalRect, attributeData, i, param, propertyNode, onChanged); + } + } + + private static void DrawSingleParameterUI( + Rect totalRect, + LwguiAttributeData attributeData, + int paramIndex, + LwguiParameterInfo param, + PropertyNode propertyNode, + Action onChanged) + { + bool hasError = attributeData.HasValidationError(paramIndex); + + switch (param.parameterType) + { + case LwguiParameterType.Bool: + DrawBoolParameter(totalRect, attributeData, paramIndex, param, onChanged, propertyNode, hasError); + break; + case LwguiParameterType.Enum: + DrawEnumParameter(totalRect, attributeData, paramIndex, param, onChanged, propertyNode, hasError); + break; + case LwguiParameterType.Float: + DrawFloatParameter(totalRect, attributeData, paramIndex, param, onChanged, propertyNode, hasError); + break; + case LwguiParameterType.Int: + DrawIntParameter(totalRect, attributeData, paramIndex, param, onChanged, propertyNode, hasError); + break; + case LwguiParameterType.PropertyName: + DrawPropertyNameParameter(totalRect, attributeData, paramIndex, param, propertyNode, onChanged, hasError); + break; + case LwguiParameterType.PassName: + DrawPassNameParameter(totalRect, attributeData, paramIndex, param, propertyNode, onChanged, hasError); + break; + case LwguiParameterType.Keyword: + case LwguiParameterType.String: + default: + DrawStringParameter(totalRect, attributeData, paramIndex, param, propertyNode, onChanged, hasError); + break; + } + } + + #region Parameter Type Specific UI + + private static void DrawBoolParameter(Rect totalRect, LwguiAttributeData attributeData, int paramIndex, LwguiParameterInfo param, Action onChanged, PropertyNode propertyNode, bool hasError) + { + Rect labelRect = new Rect(totalRect.x, totalRect.y, EditorGUIUtility.labelWidth - 4, totalRect.height); + Rect fieldRect = new Rect(totalRect.x + EditorGUIUtility.labelWidth, totalRect.y, totalRect.width - EditorGUIUtility.labelWidth, totalRect.height); + + EditorGUI.LabelField(labelRect, param.name); + + string currentValue = paramIndex < attributeData.parameters.Count ? attributeData.parameters[paramIndex] : ""; + bool currentBool = ParseBoolValue(currentValue); + + Color originalColor = GUI.color; + if (hasError) + GUI.color = Color.red; + + EditorGUI.BeginChangeCheck(); + bool newBool = EditorGUI.Toggle(fieldRect, currentBool); + if (EditorGUI.EndChangeCheck()) + { + while (attributeData.parameters.Count <= paramIndex) + attributeData.parameters.Add(""); + attributeData.parameters[paramIndex] = newBool ? "true" : "false"; + attributeData.SetParameterValue(param.name, attributeData.parameters[paramIndex]); + ValidateAndShowErrors(attributeData, paramIndex, param, propertyNode); + onChanged?.Invoke(); + } + + if (hasError) + GUI.color = originalColor; + } + + private static void DrawEnumParameter(Rect totalRect, LwguiAttributeData attributeData, int paramIndex, LwguiParameterInfo param, Action onChanged, PropertyNode propertyNode, bool hasError) + { + Rect labelRect = new Rect(totalRect.x, totalRect.y, EditorGUIUtility.labelWidth - 4, totalRect.height); + Rect fieldRect = new Rect(totalRect.x + EditorGUIUtility.labelWidth, totalRect.y, totalRect.width - EditorGUIUtility.labelWidth, totalRect.height); + + EditorGUI.LabelField(labelRect, param.name); + + string currentValue = paramIndex < attributeData.parameters.Count ? attributeData.parameters[paramIndex] : ""; + bool isEmpty = string.IsNullOrEmpty(currentValue); + + // Get options from parameter info + var options = param.enumOptions?.ToArray() ?? new string[0]; + if (options.Length == 0) + { + DrawStringParameter(totalRect, attributeData, paramIndex, param, propertyNode, onChanged, hasError); + return; + } + + int currentIndex = Array.IndexOf(options, currentValue); + if (currentIndex < 0) + { + // Use default value if available + if (isEmpty && param.hasDefaultValue && !string.IsNullOrEmpty(param.defaultValue)) + { + currentIndex = Array.IndexOf(options, param.defaultValue); + } + if (currentIndex < 0) currentIndex = 0; + } + + Color originalColor = GUI.color; + if (hasError) + GUI.color = Color.red; + + EditorGUI.BeginChangeCheck(); + int newIndex = EditorGUI.Popup(fieldRect, currentIndex, options); + if (EditorGUI.EndChangeCheck()) + { + while (attributeData.parameters.Count <= paramIndex) + attributeData.parameters.Add(""); + attributeData.parameters[paramIndex] = options[newIndex]; + attributeData.SetParameterValue(param.name, options[newIndex]); + ValidateAndShowErrors(attributeData, paramIndex, param, propertyNode); + onChanged?.Invoke(); + } + + if (hasError) + GUI.color = originalColor; + } + + private static void DrawFloatParameter(Rect totalRect, LwguiAttributeData attributeData, int paramIndex, LwguiParameterInfo param, Action onChanged, PropertyNode propertyNode, bool hasError) + { + DrawNumericParameter(totalRect, attributeData, paramIndex, param, propertyNode, onChanged, hasError, + (value, isEmpty, hasDefault, defaultValue) => + { + float result = 0f; + if (!float.TryParse(value, out result) && isEmpty && hasDefault) + float.TryParse(defaultValue, out result); + return result; + }, + (rect, val, isEmpty, errorColor) => + { + Color originalColor = GUI.color; + Color originalContentColor = GUI.contentColor; + if (errorColor != Color.white) + GUI.color = errorColor; + else if (isEmpty) + GUI.contentColor = GetPlaceholderContentColor(); + + float result = EditorGUI.FloatField(rect, val); + GUI.color = originalColor; + GUI.contentColor = originalContentColor; + return result; + }, + val => val.ToString()); + } + + private static void DrawIntParameter(Rect totalRect, LwguiAttributeData attributeData, int paramIndex, LwguiParameterInfo param, Action onChanged, PropertyNode propertyNode, bool hasError) + { + DrawNumericParameter(totalRect, attributeData, paramIndex, param, propertyNode, onChanged, hasError, + (value, isEmpty, hasDefault, defaultValue) => + { + int result = 0; + if (!int.TryParse(value, out result) && isEmpty && hasDefault) + int.TryParse(defaultValue, out result); + return result; + }, + (rect, val, isEmpty, errorColor) => + { + Color originalColor = GUI.color; + Color originalContentColor = GUI.contentColor; + if (errorColor != Color.white) + GUI.color = errorColor; + else if (isEmpty) + GUI.contentColor = GetPlaceholderContentColor(); + + int result = EditorGUI.IntField(rect, val); + GUI.color = originalColor; + GUI.contentColor = originalContentColor; + return result; + }, + val => val.ToString()); + } + + private static void DrawNumericParameter(Rect totalRect, LwguiAttributeData attributeData, int paramIndex, + LwguiParameterInfo param, PropertyNode propertyNode, Action onChanged, bool hasError, + Func parseValue, + Func drawField, + Func valueToString) + { + Rect labelRect = new Rect(totalRect.x, totalRect.y, EditorGUIUtility.labelWidth - 4, totalRect.height); + Rect fieldRect = new Rect(totalRect.x + EditorGUIUtility.labelWidth, totalRect.y, totalRect.width - EditorGUIUtility.labelWidth, totalRect.height); + + EditorGUI.LabelField(labelRect, param.name); + + string currentValue = paramIndex < attributeData.parameters.Count ? attributeData.parameters[paramIndex] : ""; + bool isEmpty = string.IsNullOrEmpty(currentValue); + + T currentValueTyped = parseValue(currentValue, isEmpty, param.hasDefaultValue, param.defaultValue); + + Color errorColor = hasError ? Color.red : Color.white; + EditorGUI.BeginChangeCheck(); + T newValue = drawField(fieldRect, currentValueTyped, isEmpty, errorColor); + + if (EditorGUI.EndChangeCheck()) + { + while (attributeData.parameters.Count <= paramIndex) + attributeData.parameters.Add(""); + attributeData.parameters[paramIndex] = valueToString(newValue); + attributeData.SetParameterValue(param.name, attributeData.parameters[paramIndex]); + ValidateAndShowErrors(attributeData, paramIndex, param, propertyNode); + onChanged?.Invoke(); + } + } + + private static void DrawPropertyNameParameter(Rect totalRect, LwguiAttributeData attributeData, int paramIndex, LwguiParameterInfo param, PropertyNode propertyNode, Action onChanged, bool hasError) + { + Rect labelRect = new Rect(totalRect.x, totalRect.y, EditorGUIUtility.labelWidth - 4, totalRect.height); + Rect fieldRect = new Rect(totalRect.x + EditorGUIUtility.labelWidth, totalRect.y, totalRect.width - EditorGUIUtility.labelWidth, totalRect.height); + + EditorGUI.LabelField(labelRect, param.name); + + var propertyNames = new List(); + if (propertyNode?.ContainerGraph?.AllNodes != null) + { + foreach (var node in propertyNode.ContainerGraph.AllNodes) + { + if (node is PropertyNode propNode && !string.IsNullOrEmpty(propNode.PropertyName)) + propertyNames.Add(propNode.PropertyName); + } + } + + string currentValue = paramIndex < attributeData.parameters.Count ? attributeData.parameters[paramIndex] : ""; + + Color originalColor = GUI.color; + if (hasError) + GUI.color = Color.red; + + int currentIndex = propertyNames.IndexOf(currentValue); + + if (propertyNames.Count > 0 && currentIndex >= 0) + { + EditorGUI.BeginChangeCheck(); + int newIndex = EditorGUI.Popup(fieldRect, currentIndex, propertyNames.ToArray()); + if (EditorGUI.EndChangeCheck()) + { + while (attributeData.parameters.Count <= paramIndex) + attributeData.parameters.Add(""); + attributeData.parameters[paramIndex] = propertyNames[newIndex]; + attributeData.SetParameterValue(param.name, propertyNames[newIndex]); + ValidateAndShowErrors(attributeData, paramIndex, param, propertyNode); + onChanged?.Invoke(); + } + } + else + { + EditorGUI.BeginChangeCheck(); + string newValue = EditorGUI.TextField(fieldRect, currentValue); + if (EditorGUI.EndChangeCheck()) + { + while (attributeData.parameters.Count <= paramIndex) + attributeData.parameters.Add(""); + attributeData.parameters[paramIndex] = newValue; + attributeData.SetParameterValue(param.name, newValue); + ValidateAndShowErrors(attributeData, paramIndex, param, propertyNode); + onChanged?.Invoke(); + } + } + + if (hasError) + GUI.color = originalColor; + } + + private static void DrawPassNameParameter(Rect totalRect, LwguiAttributeData attributeData, int paramIndex, LwguiParameterInfo param, PropertyNode propertyNode, Action onChanged, bool hasError) + { + Rect labelRect = new Rect(totalRect.x, totalRect.y, EditorGUIUtility.labelWidth - 4, totalRect.height); + Rect fieldRect = new Rect(totalRect.x + EditorGUIUtility.labelWidth, totalRect.y, totalRect.width - EditorGUIUtility.labelWidth, totalRect.height); + + EditorGUI.LabelField(labelRect, param.name); + + var passNames = GetPassNamesFromShader(propertyNode); + + string currentValue = paramIndex < attributeData.parameters.Count ? attributeData.parameters[paramIndex] : ""; + + Color originalColor = GUI.color; + if (hasError) + GUI.color = Color.red; + + var displayOptions = new List { "Empty" }; + displayOptions.AddRange(passNames); + int currentIndex = passNames.IndexOf(currentValue); + int popupIndex = currentIndex >= 0 ? currentIndex + 1 : 0; + + EditorGUI.BeginChangeCheck(); + int newPopupIndex = EditorGUI.Popup(fieldRect, popupIndex, displayOptions.ToArray()); + if (EditorGUI.EndChangeCheck()) + { + while (attributeData.parameters.Count <= paramIndex) + attributeData.parameters.Add(""); + string newValue = newPopupIndex > 0 ? passNames[newPopupIndex - 1] : ""; + attributeData.parameters[paramIndex] = newValue; + attributeData.SetParameterValue(param.name, newValue); + ValidateAndShowErrors(attributeData, paramIndex, param, propertyNode); + onChanged?.Invoke(); + } + + if (hasError) + GUI.color = originalColor; + } + + private static void DrawStringParameter(Rect totalRect, LwguiAttributeData attributeData, int paramIndex, LwguiParameterInfo param, PropertyNode propertyNode, Action onChanged, bool hasError) + { + const float dropdownWidth = 17; + + Rect labelRect = new Rect(totalRect.x, totalRect.y, EditorGUIUtility.labelWidth - 4, totalRect.height); + Rect fieldRect = new Rect(totalRect.x + EditorGUIUtility.labelWidth, totalRect.y, totalRect.width - EditorGUIUtility.labelWidth, totalRect.height); + Rect dropdownRect = new Rect(totalRect.x + totalRect.width - dropdownWidth, totalRect.y, dropdownWidth, totalRect.height); + + EditorGUI.LabelField(labelRect, param.name); + + // Dropdown button overlaps the right edge of the text field. + // Handle its click before the TextField so the button takes click priority in the overlapping area. + GUIStyle dropdownStyle = UIUtils.InspectorPopdropdownFallback ?? GUI.skin.button; + bool dropdownClicked = GUI.Button(dropdownRect, GUIContent.none, dropdownStyle); + + string currentValue = paramIndex < attributeData.parameters.Count ? attributeData.parameters[paramIndex] : ""; + bool isEmpty = string.IsNullOrEmpty(currentValue); + + Color originalColor = GUI.color; + Color originalContentColor = GUI.contentColor; + if (hasError) + { + GUI.color = Color.red; + } + else if (isEmpty) + { + // Use contentColor so only the text is tinted, not the TextField background. + GUI.contentColor = GetPlaceholderContentColor(); + } + + EditorGUI.BeginChangeCheck(); + string displayValue = isEmpty ? param.GetDefaultDisplayText() : currentValue; + string newValue = EditorGUI.TextField(fieldRect, displayValue); + + GUI.color = originalColor; + GUI.contentColor = originalContentColor; + + if (EditorGUI.EndChangeCheck()) + { + while (attributeData.parameters.Count <= paramIndex) + attributeData.parameters.Add(""); + attributeData.parameters[paramIndex] = newValue; + attributeData.SetParameterValue(param.name, newValue); + ValidateAndShowErrors(attributeData, paramIndex, param, propertyNode); + onChanged?.Invoke(); + } + + // Re-draw dropdown indicator on top of the TextField for correct visual layering + if (Event.current.type == EventType.Repaint) + dropdownStyle.Draw(dropdownRect, GUIContent.none, false, false, false, false); + + if (dropdownClicked) + { + GUIUtility.keyboardControl = 0; + EditorGUI.FocusTextInControl(null); + GUI.FocusControl(null); + + if (propertyNode != null) + { + var existingValues = CollectExistingParameterValues(propertyNode, param.name, param.parameterType.ToString()); + if (existingValues.Count > 0) + ShowParameterValueMenu(existingValues, attributeData, paramIndex, param.name, onChanged); + } + } + } + + #endregion + + #region Validation + + private static void ValidateAndShowErrors(LwguiAttributeData attributeData, int paramIndex, LwguiParameterInfo param, PropertyNode propertyNode) + { + if (paramIndex >= attributeData.parameters.Count) return; + + string value = attributeData.parameters[paramIndex]; + bool wasError = attributeData.HasValidationError(paramIndex); + + attributeData.SetValidationError(paramIndex, false); + + if (string.IsNullOrEmpty(value)) return; + + var context = CreateValidationContext(propertyNode); + var result = LwguiParameterValidator.Validate(value, param, context); + + if (!result.isValid) + { + attributeData.SetValidationError(paramIndex, true); + if (!wasError) + Debug.LogError($"[LWGUI] Validation error in {attributeData.drawerTypeName}.{param.name}: {result.errorMessage}"); + } + } + + private static ValidationContext CreateValidationContext(PropertyNode propertyNode) + { + var context = new ValidationContext(); + + if (propertyNode?.ContainerGraph?.AllNodes != null) + { + // Collect property names from all PropertyNodes + foreach (var node in propertyNode.ContainerGraph.AllNodes) + { + if (node is PropertyNode propNode && !string.IsNullOrEmpty(propNode.PropertyName)) + { + context.existingPropertyNames.Add(propNode.PropertyName); + } + } + } + + // TODO: Get pass names from shader + // This requires access to the compiled shader or template data + + return context; + } + + #endregion + + #region Helpers + + private static bool ParseBoolValue(string value) + { + if (string.IsNullOrEmpty(value)) return false; + string lower = value.ToLower(); + return lower == "true" || lower == "on" || lower == "1"; + } + + private static List GetPassNamesFromShader(PropertyNode propertyNode) + { + var passNames = new List(); + + if (propertyNode?.ContainerGraph?.CurrentMasterNode is TemplateMultiPassMasterNode templateMasterNode) + { + var template = templateMasterNode.CurrentTemplate; + if (template != null) + { + // Get all subshaders and their passes + foreach (var subShader in template.SubShaders) + { + foreach (var pass in subShader.Passes) + { + // Try to get LightMode from pass tags + string lightMode = GetLightModeFromPass(pass); + if (!string.IsNullOrEmpty(lightMode) && !passNames.Contains(lightMode)) + { + passNames.Add(lightMode); + } + } + } + } + } + + return passNames; + } + + private static string GetLightModeFromPass(TemplatePass pass) + { + // Try to get LightMode from pass modules tag data + if (pass.Modules?.TagData != null && pass.Modules.TagData.DataCheck == TemplateDataCheck.Valid) + { + foreach (var tag in pass.Modules.TagData.Tags) + { + if (tag.Name.Equals("LightMode", StringComparison.OrdinalIgnoreCase)) + { + return tag.Value; + } + } + } + + // Fallback: try to extract from pass name + if (pass.PassNameContainer != null && pass.PassNameContainer.IsValid) + { + return pass.PassNameContainer.Data; + } + + return null; + } + + #endregion + + #endregion + + #region Private Implementation - Decorator UI + + private static bool DrawDecoratorPopupButton(Rect rect, string text, GUIStyle style) + { + Color originalBackgroundColor = GUI.backgroundColor; + try + { + // Darken the dropdown background (and its arrow) in light theme for better contrast. + if (!EditorGUIUtility.isProSkin) + GUI.backgroundColor = new Color(0.5f, 0.5f, 0.5f); + + return GUI.Button(rect, text, style); + } + finally + { + GUI.backgroundColor = originalBackgroundColor; + } + } + + private static void DrawDecoratorElementUI(Rect rect, LwguiAttributeData decoratorData, int index, bool isActive, bool isFocused, Action onChanged, PropertyNode propertyNode = null) + { + decoratorData.ValidateAndRepair(); + + if (Event.current.type == EventType.ContextClick && rect.Contains(Event.current.mousePosition)) + { + GenericMenu menu = new GenericMenu(); + PopulateDecoratorContextMenu(menu, decoratorData, onChanged); + menu.ShowAsContext(); + Event.current.Use(); + } + + GUIStyle popupStyle = GetLwguiPopupStyle(); + float labelWidth = EditorGUIUtility.labelWidth - 4; + float fieldX = rect.x + labelWidth; + float fieldWidth = rect.width - labelWidth; + + Rect typeLabelRect = new Rect(rect.x, rect.y + 2, labelWidth, EditorGUIUtility.singleLineHeight); + Rect typeRect = new Rect(fieldX, rect.y + 2, fieldWidth, EditorGUIUtility.singleLineHeight); + + EditorGUI.LabelField(typeLabelRect, "Type"); + + string displayName = string.IsNullOrEmpty(decoratorData.drawerTypeName) ? "Select Decorator..." : decoratorData.drawerTypeName; + if (DrawDecoratorPopupButton(typeRect, displayName, popupStyle)) + ShowDecoratorSelectionMenu(decoratorData, onChanged); + + if (!string.IsNullOrEmpty(decoratorData.drawerTypeName)) + { + var drawerInfo = LwguiDrawerDiscovery.GetDrawerInfo(decoratorData.drawerTypeName); + if (drawerInfo != null && drawerInfo.constructors.Count > 1) + { + Rect constructorLabelRect = new Rect(rect.x, rect.y + typeRect.height + 4, labelWidth, EditorGUIUtility.singleLineHeight); + Rect constructorRect = new Rect(fieldX, rect.y + typeRect.height + 4, fieldWidth, EditorGUIUtility.singleLineHeight); + + EditorGUI.LabelField(constructorLabelRect, "Constructor"); + + var constructorInfo = decoratorData.GetCurrentConstructor(); + int currentIndex = drawerInfo.constructors.IndexOf(constructorInfo) + 1; + int totalCount = drawerInfo.constructors.Count; + string constructorDisplayName = $"({currentIndex} / {totalCount})"; + + if (DrawDecoratorPopupButton(constructorRect, constructorDisplayName, popupStyle)) + { + ShowConstructorSelectionMenu(decoratorData, drawerInfo, onChanged); + } + + DrawDecoratorParameters(rect, decoratorData, onChanged, typeRect.height + constructorRect.height + 8, propertyNode); + } + else + { + DrawDecoratorParameters(rect, decoratorData, onChanged, typeRect.height + 4, propertyNode); + } + } + } + + private static void DrawDecoratorParameters(Rect rect, LwguiAttributeData decoratorData, Action onChanged, float yOffset, PropertyNode propertyNode) + { + var constructorInfo = decoratorData.GetCurrentConstructor(); + if (constructorInfo == null || constructorInfo.parameters.Count == 0) return; + + float lineHeight = EditorGUIUtility.singleLineHeight; + float spacing = 2; + + for (int i = 0; i < constructorInfo.parameters.Count; i++) + { + var param = constructorInfo.parameters[i]; + while (decoratorData.parameters.Count <= i) + decoratorData.parameters.Add(""); + + Rect paramRect = new Rect(rect.x, rect.y + yOffset + i * (lineHeight + spacing), rect.width, lineHeight); + DrawSingleParameterUI(paramRect, decoratorData, i, param, propertyNode, onChanged); + } + } + + #endregion + + #region Private Implementation - Menus + + private static void ShowDrawerOnlySelectionMenu(LwguiAttributeData drawerData, Action onChanged, ShaderPropertyType? propType = null) + { + var drawers = LwguiDrawerDiscovery.GetDrawers(); + if (propType.HasValue) + drawers = drawers.Where(d => d.IsSupportedPropertyType(propType.Value)).ToList(); + ShowTypeSelectionMenu(drawerData, drawers, true, onChanged); + } + + private static void ShowDecoratorSelectionMenu(LwguiAttributeData decoratorData, Action onChanged) + { + ShowTypeSelectionMenu(decoratorData, LwguiDrawerDiscovery.GetDecorators(), false, onChanged); + } + + private static void ShowTypeSelectionMenu(LwguiAttributeData data, List types, bool includeNoneOption, Action onChanged) + { + GenericMenu menu = new GenericMenu(); + + if (includeNoneOption) + { + menu.AddItem(new GUIContent("None"), string.IsNullOrEmpty(data.drawerTypeName), () => + { + data.drawerTypeName = string.Empty; + data.parameters.Clear(); + data.namedParameters.Clear(); + data.constructorSignature = ""; + onChanged?.Invoke(); + }); + menu.AddSeparator(""); + } + + foreach (var categoryGroup in types.GroupBy(d => d.categoryPath ?? "Uncategorized").OrderBy(g => g.Key)) + { + string prefix = string.IsNullOrEmpty(categoryGroup.Key) || categoryGroup.Key == "Uncategorized" ? "" : $"{categoryGroup.Key}/"; + + foreach (var type in categoryGroup.OrderBy(d => d.order).ThenBy(d => d.displayName)) + { + // If type has multiple constructors, show submenu + if (type.constructors.Count > 1) + { + string menuPath = prefix + type.displayName; + + // Add submenu items for each constructor (all are already valid) + for (int i = 0; i < type.constructors.Count; i++) + { + var constructor = type.constructors[i]; + string constructorPath = $"{menuPath}/{i + 1}. {constructor.displayName}"; + bool isSelected = data.drawerTypeName == type.typeName && data.constructorSignature == constructor.GetFullSignature(); + + string capturedTypeName = type.typeName; + string capturedSignature = constructor.GetFullSignature(); + bool capturedIsDecorator = !includeNoneOption; + + menu.AddItem(new GUIContent(constructorPath), isSelected, () => + { + data.drawerTypeName = capturedTypeName; + data.constructorSignature = capturedSignature; + data.isDecorator = capturedIsDecorator; + + var drawerInfo = LwguiDrawerDiscovery.GetDrawerInfo(capturedTypeName); + var constructorInfo = drawerInfo?.GetConstructorBySignature(capturedSignature); + if (constructorInfo != null) + { + data.namedParameters = constructorInfo.parameters.Select(p => new NamedParameterValue + { + name = p.name, + value = "" + }).ToList(); + data.parameters.Clear(); + foreach (var p in constructorInfo.parameters) + data.parameters.Add(""); + } + + onChanged?.Invoke(); + }); + } + } + else + { + // Single constructor - direct selection + string menuPath = prefix + type.displayName; + bool isSelected = data.drawerTypeName == type.typeName; + + // Capture variables for closure + string capturedTypeName = type.typeName; + bool capturedIsDecorator = !includeNoneOption; + + menu.AddItem(new GUIContent(menuPath), isSelected, () => + { + data.drawerTypeName = capturedTypeName; + data.isDecorator = capturedIsDecorator; + + var drawerInfo = LwguiDrawerDiscovery.GetDrawerInfo(capturedTypeName); + var constructorInfo = drawerInfo?.GetMainConstructor(); + if (constructorInfo != null) + { + data.constructorSignature = constructorInfo.GetFullSignature(); + data.namedParameters = constructorInfo.parameters.Select(p => new NamedParameterValue + { + name = p.name, + value = "" + }).ToList(); + data.parameters.Clear(); + foreach (var p in constructorInfo.parameters) + data.parameters.Add(""); + } + + onChanged?.Invoke(); + }); + } + } + } + + menu.ShowAsContext(); + } + + private static void ShowConstructorSelectionMenu(LwguiAttributeData data, LwguiDrawerInfo drawerInfo, Action onChanged) + { + GenericMenu menu = new GenericMenu(); + + for (int i = 0; i < drawerInfo.constructors.Count; i++) + { + var constructor = drawerInfo.constructors[i]; + bool isSelected = data.constructorSignature == constructor.GetFullSignature(); + string capturedSignature = constructor.GetFullSignature(); + + menu.AddItem(new GUIContent($"{i + 1}. {constructor.displayName}"), isSelected, () => + { + data.SwitchConstructor(capturedSignature); + onChanged?.Invoke(); + }); + } + + menu.ShowAsContext(); + } + + private static void ShowParameterValueMenu(List values, LwguiAttributeData data, int paramIndex, string paramName, Action onChanged) + { + GenericMenu menu = new GenericMenu(); + string currentValue = paramIndex < data.parameters.Count ? data.parameters[paramIndex] : ""; + + foreach (var value in values) + { + string captured = value; + bool isSelected = currentValue == captured; + + menu.AddItem(new GUIContent(captured), isSelected, () => + { + GUIUtility.keyboardControl = 0; + EditorGUI.FocusTextInControl(null); + GUI.FocusControl(null); + + while (data.parameters.Count <= paramIndex) + data.parameters.Add(""); + data.parameters[paramIndex] = captured; + data.SetParameterValue(paramName, captured); + onChanged?.Invoke(); + }); + } + + menu.ShowAsContext(); + } + + #endregion + + #region Private Helpers + + private static void DrawFoldoutSection(string title, string helpUrl, ref bool foldoutState, Action contentAction, Action populateContextMenu = null) + { + Color cachedColor = GUI.color; + GUI.color = new Color(cachedColor.r, cachedColor.g, cachedColor.b, 0.5f); + EditorGUILayout.BeginHorizontal(UIUtils.MenuItemToolbarStyle); + GUI.color = cachedColor; + + bool value = GUILayout.Toggle(foldoutState, title, UIUtils.MenuItemToggleStyle); + if (Event.current.button == Constants.FoldoutMouseId) + foldoutState = value; + + GUILayout.FlexibleSpace(); + DrawHelpButton(helpUrl); + + EditorGUILayout.EndHorizontal(); + + Rect headerRect = GUILayoutUtility.GetLastRect(); + headerRect = new Rect(0, headerRect.y, EditorGUIUtility.currentViewWidth, headerRect.height); + + if (populateContextMenu != null + && Event.current.type == EventType.ContextClick + && headerRect.Contains(Event.current.mousePosition)) + { + GenericMenu menu = new GenericMenu(); + populateContextMenu(menu); + menu.ShowAsContext(); + Event.current.Use(); + } + + if (!foldoutState) + return; + + cachedColor = GUI.color; + GUI.color = new Color(cachedColor.r, cachedColor.g, cachedColor.b, EditorGUIUtility.isProSkin ? 0.5f : 0.25f); + EditorGUILayout.BeginVertical(UIUtils.MenuItemBackgroundStyle); + GUI.color = cachedColor; + + EditorGUI.indentLevel++; + + contentAction?.Invoke(); + + EditorGUI.indentLevel--; + EditorGUILayout.Separator(); + EditorGUILayout.EndVertical(); + + if (populateContextMenu != null) + { + Rect contentEndRect = GUILayoutUtility.GetLastRect(); + Rect contentRect = new Rect(0, headerRect.yMax, EditorGUIUtility.currentViewWidth, contentEndRect.yMax - headerRect.yMax); + + if (Event.current.type == EventType.ContextClick + && contentRect.Contains(Event.current.mousePosition)) + { + GenericMenu menu = new GenericMenu(); + populateContextMenu(menu); + menu.ShowAsContext(); + Event.current.Use(); + } + } + } + + private static void DrawHelpButton(string url) + { + if (s_helpIconContent == null) + { + s_helpIconContent = EditorGUIUtility.IconContent("_Help"); + } + + if (GUILayout.Button(s_helpIconContent, EditorStyles.iconButton, GUILayout.Width(20), GUILayout.Height(18))) + { + Help.BrowseURL(url); + } + } + + private static void CollectValuesFromAttribute(LwguiAttributeData attrData, string paramName, string paramType, HashSet values) + { + var drawerInfo = LwguiDrawerDiscovery.GetDrawerInfo(attrData.drawerTypeName); + if (drawerInfo == null) return; + + // Check if this parameter name exists in any constructor of this drawer + if (!drawerInfo.allParameterNames.Contains(paramName, StringComparer.OrdinalIgnoreCase)) + return; + + // Get the currently selected constructor using signature hash + var constructorInfo = attrData.GetCurrentConstructor(); + if (constructorInfo == null) return; + + // Find the parameter in the current constructor + for (int i = 0; i < constructorInfo.parameters.Count; i++) + { + var param = constructorInfo.parameters[i]; + + if (!string.Equals(param.name, paramName, StringComparison.OrdinalIgnoreCase)) continue; + + // Compare parameter types + string currentParamType = param.parameterType.ToString(); + if (!string.Equals(currentParamType, paramType, StringComparison.OrdinalIgnoreCase)) continue; + + if (i < attrData.parameters.Count) + { + string value = attrData.parameters[i]; + if (string.IsNullOrEmpty(value)) continue; + if (LwguiDrawerDiscovery.IsDefaultValue(value, param)) continue; + values.Add(value); + } + } + } + + #endregion + + #region Copy/Paste Operations + + private static LwguiAttributeData _copiedAttribute; + private static List _copiedAttributes; + + private static LwguiAttributeData DeepCopy(LwguiAttributeData source) + { + return JsonUtility.FromJson(JsonUtility.ToJson(source)); + } + + private static void CopyAttribute(LwguiAttributeData data) + { + _copiedAttribute = DeepCopy(data); + } + + private static void CopyAttributes(List attributes) + { + _copiedAttributes = new List(attributes.Count); + foreach (var attr in attributes) + _copiedAttributes.Add(DeepCopy(attr)); + } + + private static void PasteAttributeToExisting(LwguiAttributeData target, Action onChanged) + { + JsonUtility.FromJsonOverwrite(JsonUtility.ToJson(_copiedAttribute), target); + target.ValidateAndRepair(); + target.ClearValidationErrors(); + onChanged?.Invoke(); + } + + private static void PasteAttributesToList(List targetList, Action onChanged) + { + targetList.Clear(); + foreach (var attr in _copiedAttributes) + { + attr.ValidateAndRepair(); + targetList.Add(DeepCopy(attr)); + } + onChanged?.Invoke(); + } + + private static void PopulateDrawerContextMenu(GenericMenu menu, LwguiAttributeData drawerData, Action onChanged) + { + menu.AddItem(new GUIContent("Copy Drawer"), false, () => CopyAttribute(drawerData)); + if (_copiedAttribute != null) + menu.AddItem(new GUIContent("Paste Drawer"), false, () => PasteAttributeToExisting(drawerData, onChanged)); + else + menu.AddDisabledItem(new GUIContent("Paste Drawer")); + } + + private static void PopulateDecoratorContextMenu(GenericMenu menu, LwguiAttributeData decoratorData, Action onChanged) + { + menu.AddItem(new GUIContent("Copy Decorator"), false, () => CopyAttribute(decoratorData)); + if (_copiedAttribute != null) + menu.AddItem(new GUIContent("Paste Decorator"), false, () => PasteAttributeToExisting(decoratorData, onChanged)); + else + menu.AddDisabledItem(new GUIContent("Paste Decorator")); + } + + private static void PopulateDecoratorsContextMenu(GenericMenu menu, List decorators, Action onChanged) + { + menu.AddItem(new GUIContent("Copy All Decorators"), false, () => CopyAttributes(decorators)); + if (_copiedAttributes != null && _copiedAttributes.Count > 0) + menu.AddItem(new GUIContent("Paste All Decorators"), false, () => PasteAttributesToList(decorators, onChanged)); + else + menu.AddDisabledItem(new GUIContent("Paste All Decorators")); + } + + #endregion + } +} + +#endif // LWGUI_ASE_INTEGRATION diff --git a/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiExtensionHelper.cs.meta b/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiExtensionHelper.cs.meta new file mode 100644 index 0000000..9bd5f4c --- /dev/null +++ b/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiExtensionHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 48ebb0320ac752349be277d853ef9ad0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiPropertyNodeExtension.cs b/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiPropertyNodeExtension.cs new file mode 100644 index 0000000..8b45d86 --- /dev/null +++ b/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiPropertyNodeExtension.cs @@ -0,0 +1,148 @@ +// Copyright (c) Jason Ma +// LWGUI - Amplify Shader Editor Property Node Extension +// Bridges LWGUI drawer/decorator system into ASE's IPropertyNodeExtension API. +// Requires both LWGUI and AmplifyShaderEditor assemblies to be present. + +#if LWGUI_ASE_INTEGRATION +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using AmplifyShaderEditor; +using UnityEditor; +using UnityEditorInternal; +using UnityEngine; + +namespace LWGUI +{ + /// + /// Sets ASE's default custom inspector to LWGUI when this bridge is active. + /// Runs once at domain reload. When the integration is disabled (symbol removed), + /// this code doesn't compile, so PreferredCustomInspector stays null (ASE default). + /// + internal static class LwguiCustomInspectorSetup + { + [InitializeOnLoadMethod] + static void SetPreferredCustomInspector() + { + Constants.PreferredCustomInspector = "LWGUI.LWGUI"; + } + } + + public sealed class LwguiPropertyNodeExtension : IPropertyNodeExtension + { + private const string Id = "LWGUI"; + + #region Per-Node Data Model + + [Serializable] + internal class NodeData + { + public LwguiAttributeData drawer = new LwguiAttributeData(); + public List decorators = new List(); + + [NonSerialized] public bool drawerFoldout = true; + [NonSerialized] public bool decoratorsFoldout = true; + [NonSerialized] public ReorderableList decoratorsReorderableList; + } + + private static readonly ConditionalWeakTable s_data = + new ConditionalWeakTable(); + + #endregion + + #region IPropertyNodeExtension + + public string ExtensionId => Id; + + public void DrawUI( PropertyNode node ) + { + var data = GetData( node ); + var onChanged = new Action( () => + { + node.IsDirty = true; + node.SetSaveIsDirty(); + } ); + + LwguiExtensionHelper.DrawLwguiDrawerSection( + data.drawer, ref data.drawerFoldout, onChanged, node ); + + LwguiExtensionHelper.DrawLwguiDecoratorsSection( + data.decorators, ref data.decoratorsFoldout, onChanged, node, + ref data.decoratorsReorderableList ); + } + + public string BuildAttributes( PropertyNode node ) + { + var data = GetData( node ); + return LwguiExtensionHelper.GenerateAttributesString( data.drawer, data.decorators ); + } + + public string WriteData( PropertyNode node ) + { + var data = GetData( node ); + bool hasDrawer = data.drawer != null && !string.IsNullOrEmpty( data.drawer.drawerTypeName ); + bool hasDecorators = data.decorators != null && data.decorators.Any( + d => !string.IsNullOrEmpty( d.drawerTypeName ) ); + + if ( !hasDrawer && !hasDecorators ) + return string.Empty; + + return Convert.ToBase64String( + Encoding.UTF8.GetBytes( JsonUtility.ToJson( data ) ) ); + } + + public void ReadData( PropertyNode node, string token ) + { + if ( string.IsNullOrEmpty( token ) ) return; + + try + { + var data = GetData( node ); + JsonUtility.FromJsonOverwrite( + Encoding.UTF8.GetString( Convert.FromBase64String( token ) ), data ); + } + catch ( Exception e ) + { + Debug.LogWarning( + $"[LWGUI] Failed to parse ASE extension token for node '{node?.GetType().Name ?? "unknown"}': {e.Message}" ); + } + } + + #endregion + + #region Data Access + + /// + /// Gets the per-node data, restoring from persisted token on cache miss (e.g. after domain reload). + /// + internal static NodeData GetData( PropertyNode node ) + { + if ( !s_data.TryGetValue( node, out NodeData data ) ) + { + data = new NodeData(); + DecodeInto( data, PropertyNodeExtensions.GetToken( node, Id ) ); + s_data.Add( node, data ); + } + return data; + } + + private static void DecodeInto( NodeData data, string token ) + { + if ( string.IsNullOrEmpty( token ) ) return; + try + { + JsonUtility.FromJsonOverwrite( + Encoding.UTF8.GetString( Convert.FromBase64String( token ) ), data ); + } + catch ( Exception e ) + { + Debug.LogWarning( $"[LWGUI] Failed to decode ASE extension token: {e.Message}" ); + } + } + + #endregion + } +} +#endif diff --git a/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiPropertyNodeExtension.cs.meta b/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiPropertyNodeExtension.cs.meta new file mode 100644 index 0000000..f387a62 --- /dev/null +++ b/Editor/ThirdParty/AmplifyShaderEditorBridge/LwguiPropertyNodeExtension.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 95026caad2fefb946898c1df85bdcb60 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/README.md b/README.md index 4e7d2e3..a7739b6 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,13 @@ It significantly shortens iteration cycles while improving collaboration between ![LWGUI](assets~/LWGUI.png) -| ![image-20240716183800118](./assets~/image-20240716183800118.png) | ![](assets~/Pasted%20image%2020250522183200.png) | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | -| A more powerful Gradient editor than UE, with support for both Shader and C# | **NEW: Use Ramp Atlas to include multiple Ramps in one Texture** | -| ![image-20250314160119094](./assets~/image-20250314160119094.png) | ![image-20220926025611208](./assets~/image-20220926025611208.png) | -| **NEW: When recording material parameter animations in Timeline, automatically capture changes to Toggle's Keywords to enable switching material Keywords at runtime.** | Feature-rich toolbar | +| ![](assets~/Pasted%20image%2020260714225931.png) | ![](assets~/Pasted%20image%2020260714230034.png) | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | +| **NEW: Now supports visual editing of LWGUI Attributes in Amplify Shader Editor!
You need to install ASE v1.9.9.10+ and enable `Project Settings > LWGUI > ASE Integration`** | The new `SampleAmplifyShader` can help you get started quickly! | +| ![image-20240716183800118](./assets~/image-20240716183800118.png) | ![](assets~/Pasted%20image%2020250522183200.png) | +| A more powerful Gradient editor than UE, with support for both Shader and C# | Use Ramp Atlas to include multiple Ramps in one Texture | +| ![image-20250314160119094](./assets~/image-20250314160119094.png) | ![image-20220926025611208](./assets~/image-20220926025611208.png) | +| When recording material parameter animations in Timeline, automatically capture changes to Toggle's Keywords to enable switching material Keywords at runtime. | Feature-rich toolbar | | With your sponsorship, I will update more actively. | 有你的赞助我会更加积极地更新 | | --------------------------------------------------- | ----------------------------------------------------------------------------------------- | @@ -29,6 +31,8 @@ It significantly shortens iteration cycles while improving collaboration between * [LWGUI (Light Weight Shader GUI)](#lwgui-light-weight-shader-gui) * [Installation](#installation) * [Getting Started](#getting-started) + * [NEW: Using in Amplify Shader Editor](#new-using-in-amplify-shader-editor) + * [Using in a Code Editor](#using-in-a-code-editor) * [Basic Drawers](#basic-drawers) * [Main & Sub](#main--sub) * [Extra Drawers](#extra-drawers) @@ -111,6 +115,20 @@ It significantly shortens iteration cycles while improving collaboration between ## Getting Started +### NEW: Using in Amplify Shader Editor + +1. Install ASE `v1.9.9.10 +` +2. Enable: `Project Settings > LWGUI > ASE Integration` (At this point, ASE's default Custom Editor will be replaced with `LWGUI.LWGUI`) +3. Create or open an Amplify Shader, create or select a Parameter node, and now you can edit LWGUI Drawers and Decorators: +![](assets~/Pasted%20image%2020260714231511.png) +- Each Parameter node can only have one Drawer, but can have multiple Decorators +- Detailed descriptions of all Drawers and Decorators can be found below +- You need to manually select the constructor, a constructor with fewer parameters means some parameters use default values +- Don't forget to adjust the order of parameters! Incorrect order can cause layout issues +- You can view the generated code to help solve problems + +### Using in a Code Editor + 1. Create a newer or use the existing Shader 2. Open the Shader in the code editor 3. At the bottom of the Shader, before the last large bracket, add line:`CustomEditor "LWGUI.LWGUI"` diff --git a/README_CN.md b/README_CN.md index 07eccbc..3c4b135 100644 --- a/README_CN.md +++ b/README_CN.md @@ -15,11 +15,13 @@ LWGUI 已在诸多大型商业项目中长期验证: ![LWGUI](assets~/LWGUI.png) -| ![image-20240716183800118](./assets~/image-20240716183800118.png) | ![](assets~/Pasted%20image%2020250522183200.png) | -| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- | -| 比UE更加强大的Gradient编辑器, 同时支持Shader和C# | **NEW: 使用Ramp Atlas在一个Texture中包含多个Ramp** | -| ![image-20250314160119094](./assets~/image-20250314160119094.png) | ![image-20220926025611208](./assets~/image-20220926025611208.png) | -| **NEW: Timeline中录制材质参数动画时, 自动捕获Toggle的Keyword更改, 以便运行时切换材质Keyword** | 功能丰富的工具栏 | +| ![](assets~/Pasted%20image%2020260714225931.png) | ![](assets~/Pasted%20image%2020260714230034.png) | +| ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | +| **NEW: 现已支持在Amplify Shader Editor中可视化编辑LWGUI Attributes!

你需要安装ASE v1.9.9.10+, 并启用`Project Settings > LWGUI > ASE Integration`** | 新的`SampleAmplifyShader`可以帮助你快速入门! | +| ![image-20240716183800118](./assets~/image-20240716183800118.png) | ![](assets~/Pasted%20image%2020250522183200.png) | +| 比UE更加强大的Gradient编辑器, 同时支持Shader和C# | 使用Ramp Atlas在一个Texture中包含多个Ramp | +| ![image-20250314160119094](./assets~/image-20250314160119094.png) | ![image-20220926025611208](./assets~/image-20220926025611208.png) | +| Timeline中录制材质参数动画时, 自动捕获Toggle的Keyword更改, 以便运行时切换材质Keyword | 功能丰富的工具栏 | | With your sponsorship, I will update more actively. | 有你的赞助我会更加积极地更新 | | --------------------------------------------------- | ----------------------------------------------------------------------------------------- | @@ -29,6 +31,8 @@ LWGUI 已在诸多大型商业项目中长期验证: * [LWGUI (Light Weight Shader GUI)](#lwgui-light-weight-shader-gui) * [安装](#安装) * [入门](#入门) + * [NEW: 在 Amplify Shader Editor 中使用](#new-在-amplify-shader-editor-中使用) + * [在代码编辑器中使用](#在代码编辑器中使用) * [Basic Drawers](#basic-drawers) * [Main & Sub](#main--sub) * [Extra Drawers](#extra-drawers) @@ -110,6 +114,20 @@ LWGUI 已在诸多大型商业项目中长期验证: ## 入门 +### NEW: 在 Amplify Shader Editor 中使用 + +1. 安装ASE `v1.9.9.10 +` +2. 启用: `Project Settings > LWGUI > ASE Integration` (此时ASE的默认Custom Editor会被替换为`LWGUI.LWGUI`) +3. 新建或打开Amplify Shader, 创建或选中Parameter节点, 现在就可以编辑LWGUI Drawer和Decorator了: +![](assets~/Pasted%20image%2020260714231511.png) +- 每个Parameter节点只能有一个Drawer, 但是可以有多个Decorator +- 所有可选的Drawer和Decorator的详细说明可以在下方找到 +- 你需要手动选择构造函数, 参数更少的构造函数意味着部分参数为默认值 +- 别忘了调整参数的顺序! 顺序会导致布局异常 +- 你可以查看生成的代码辅助解决问题 + +### 在代码编辑器中使用 + 1. 新建一个Shader或使用现有的Shader 2. 在代码编辑器中打开Shader 3. 在Shader最底部, 最后一个大括号之前, 添加行:`CustomEditor "LWGUI.LWGUI"` diff --git a/Runtime/RuntimeHelper.cs b/Runtime/RuntimeHelper.cs index 7049983..d080005 100644 --- a/Runtime/RuntimeHelper.cs +++ b/Runtime/RuntimeHelper.cs @@ -1,4 +1,4 @@ -// Copyright (c) Jason Ma +// Copyright (c) Jason Ma namespace LWGUI.Runtime { @@ -7,6 +7,6 @@ public static class RuntimeHelper public static bool IsBitEnabled(int intValue, int bitIndex) => (intValue & 1U << bitIndex) > 0; public static int SetBitEnabled(int intValue, int bitIndex, bool enabled) - => enabled ? intValue | (int)(1U << bitIndex) : intValue ^ (int)(1U << bitIndex); + => enabled ? intValue | (int)(1U << bitIndex) : intValue & ~(int)(1U << bitIndex); } } \ No newline at end of file diff --git a/Test/SampleAmplifyFunction_Enum.asset b/Test/SampleAmplifyFunction_Enum.asset index b0f3311..959d708 100644 --- a/Test/SampleAmplifyFunction_Enum.asset +++ b/Test/SampleAmplifyFunction_Enum.asset @@ -12,38 +12,33 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3} m_Name: SampleAmplifyFunction_Enum m_EditorClassIdentifier: - m_functionInfo: "// Made with Amplify Shader Editor v2.0.0\n// Available at the - Unity Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=20000\nNode;AmplifyShaderEditor.CommentaryNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;21;-720,-80;Inherit;False;1447.371;686.4854;Keyword - Switch: Shader Feature Local;8;8;4;18;13;12;20;22;23;;1,1,1,1;0;0\nNode;AmplifyShaderEditor.StickyNoteNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;20;-64,224;Inherit;False;697.6001;100;Code:;;1,1,1,1;#pragma - shader_feature_local _ENABLE_RED _ENABLE_GREEN _ENABLE_BLUE;0;0\nNode;AmplifyShaderEditor.ColorNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;12;-336,-32;Inherit;False;Constant;_Color0;Color - 0;3;0;Create;True;0;0;0;False;0;False;0;0;1,0,0,0;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5\nNode;AmplifyShaderEditor.ColorNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;13;-336,160;Inherit;False;Constant;_Color1;Color - 0;3;0;Create;True;0;0;0;False;0;False;0;0;0,1,0,0;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5\nNode;AmplifyShaderEditor.ColorNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;18;-336,336;Inherit;False;Constant;_Color2;Color - 0;3;0;Create;True;0;0;0;False;0;False;0;0;0,0,1,0;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5\nNode;AmplifyShaderEditor.StaticSwitch, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;22;176,0;Inherit;False;Property;_ENABLE_RED;_ENABLE_RED;3;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;False;_ENABLE_RED;Toggle;2;RED;GREEN;Reference;8;True;True;All;9;1;FLOAT3;0,0,0;False;0;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;4;FLOAT3;0,0,0;False;5;FLOAT3;0,0,0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.RangedFloatNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;2;-672,-208;Inherit;False;Property;_SubEnum;Sub - Enum;1;0;Create;True;0;0;0;True;0;False;1;SubEnumDrawer;string group,string n1,string - v1,string n2,string v2,string n3,string v3;7;Enum;R;0;G;1;B;2;7;group;Enum;n1;R;v1;0;n2;G;v2;1;n3;B;v3;2;0;0;0;0;0;0;1;FLOAT;0\nNode;AmplifyShaderEditor.StaticSwitch, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;8;-64,96;Inherit;False;Property;_ENABLE_;_ENABLE_;3;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;False;_ENABLE;KeywordEnum;3;RED;GREEN;BLUE;Create;True;True;All;9;1;FLOAT3;0,0,0;False;0;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;4;FLOAT3;0,0,0;False;5;FLOAT3;0,0,0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.RangedFloatNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;4;-672,-32;Inherit;False;Property;_KWEnum;KW - Enum;2;0;Create;True;0;0;0;True;0;False;1;KWEnumDrawer;string group,string n1,string - k1,string n2,string k2,string n3,string k3;7;Enum;Red;_ENABLE_RED;Green;_ENABLE_GREEN;Blue;_ENABLE_BLUE;7;group;Enum;n1;Red;k1;_ENABLE_RED;n2;Green;k2;_ENABLE_GREEN;n3;Blue;k3;_ENABLE_BLUE;0;0;0;0;0;0;1;FLOAT;0\nNode;AmplifyShaderEditor.StaticSwitch, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;23;416,0;Inherit;False;Property;_ENABLE_RED;_ENABLE_RED;3;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;False;_ENABLE_RED;Toggle;2;RED;GREEN;Fetch;True;True;All;9;1;FLOAT3;0,0,0;False;0;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;4;FLOAT3;0,0,0;False;5;FLOAT3;0,0,0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.RangedFloatNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;25;-672,640;Inherit;False;Property;_SubKeywordEnum;Sub - Keyword Enum;3;0;Create;True;0;0;0;True;0;False;1;SubKeywordEnumDrawer;string - group,string kw1,string kw2,string kw3;4;Enum;_KEY_1;_KEY_2;_KEY_3;4;group;Enum;kw1;_KEY_1;kw2;_KEY_2;kw3;_KEY_3;0;0;0;0;0;0;1;FLOAT;0\nNode;AmplifyShaderEditor.RangedFloatNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;26;-672,816;Inherit;False;Property;_Preset;Preset;4;0;Create;True;0;0;0;True;0;False;1;PresetDrawer;string - group,string presetFileName;2;Enum;LWGUI_ShaderPropertyPreset;2;group;Enum;presetFileName;LWGUI_ShaderPropertyPreset;0;0;0;0;0;0;1;FLOAT;0\nNode;AmplifyShaderEditor.RangedFloatNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;27;-672,880;Inherit;False;Property;_float1;Float - in Preset;5;0;Create;False;0;0;0;True;0;False;1;SubDrawer;string group;1;Enum;1;group;Enum;0;0;0;-1;1;0;1;FLOAT;0\nNode;AmplifyShaderEditor.RangedFloatNode, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;3;-672,-320;Inherit;False;Property;_EnumGroup;====== - Enum Group - ASE Function ======;0;0;Create;False;0;0;0;True;0;False;1;MainDrawer;string - group,keyword keyword,enum defaultFoldingState,enum defaultToggleDisplayed;4;Enum;;on;off;4;group;Enum;keyword;;defaultFoldingState;on;defaultToggleDisplayed;off;0;0;0;0;0;0;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionOutput, - AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;0;1184,96;Inherit;False;True;-1;Output;0;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nWireConnection;8;1;12;5\nWireConnection;8;0;13;5\nWireConnection;8;2;18;5\nWireConnection;0;0;8;0\nASEEND*/\n//CHKSM=0DAAFEED58DA696B5972F6F535CFA60D762B0AA2" + m_functionInfo: "// Made with Amplify Shader Editor v1.9.9.10\n// Available at + the Unity Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=19910\n{\"type\":\"AmplifyShaderEditor.CommentaryNode, + AmplifyShaderEditor\",\"id\":21,\"pos\":[-720,-80],\"params\":[\"Inherit\",\"False\",\"1447.371\",\"686.4854\",\"Keyword + Switch: Shader Feature Local\",\"8\",\"8\",\"4\",\"18\",\"13\",\"12\",\"20\",\"22\",\"23\",\"\",\"1,1,1,1\",\"0\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.StickyNoteNode, + AmplifyShaderEditor\",\"id\":20,\"pos\":[-64,224],\"params\":[\"Inherit\",\"False\",\"697.6001\",\"100\",\"Code:\",\"\",\"1,1,1,1\",\"#pragma + shader_feature_local _ENABLE_RED _ENABLE_GREEN _ENABLE_BLUE\",\"0\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.ColorNode, + AmplifyShaderEditor\",\"id\":12,\"pos\":[-336,-32],\"params\":[\"Inherit\",\"False\",\"Constant\",\"_Color0\",\"Color + 0\",\"3\",\"0\",\"Create\",\"True\",\"0\",\"0\",\"0\",\"False\",\"0\",\"False\",\"Object\",\"-1\",\"\",\"1,0,0,0\",\"0,0,0,0\",\"True\",\"True\",\"0\",\"6\",\"COLOR\",\"0\",\"FLOAT\",\"1\",\"FLOAT\",\"2\",\"FLOAT\",\"3\",\"FLOAT\",\"4\",\"FLOAT3\",\"5\"]}\n{\"type\":\"AmplifyShaderEditor.ColorNode, + AmplifyShaderEditor\",\"id\":13,\"pos\":[-336,160],\"params\":[\"Inherit\",\"False\",\"Constant\",\"_Color1\",\"Color + 0\",\"3\",\"0\",\"Create\",\"True\",\"0\",\"0\",\"0\",\"False\",\"0\",\"False\",\"Object\",\"-1\",\"\",\"0,1,0,0\",\"0,0,0,0\",\"True\",\"True\",\"0\",\"6\",\"COLOR\",\"0\",\"FLOAT\",\"1\",\"FLOAT\",\"2\",\"FLOAT\",\"3\",\"FLOAT\",\"4\",\"FLOAT3\",\"5\"]}\n{\"type\":\"AmplifyShaderEditor.ColorNode, + AmplifyShaderEditor\",\"id\":18,\"pos\":[-336,336],\"params\":[\"Inherit\",\"False\",\"Constant\",\"_Color2\",\"Color + 0\",\"3\",\"0\",\"Create\",\"True\",\"0\",\"0\",\"0\",\"False\",\"0\",\"False\",\"Object\",\"-1\",\"\",\"0,0,1,0\",\"0,0,0,0\",\"True\",\"True\",\"0\",\"6\",\"COLOR\",\"0\",\"FLOAT\",\"1\",\"FLOAT\",\"2\",\"FLOAT\",\"3\",\"FLOAT\",\"4\",\"FLOAT3\",\"5\"]}\n{\"type\":\"AmplifyShaderEditor.StaticSwitch, + AmplifyShaderEditor\",\"id\":22,\"pos\":[176,0],\"params\":[\"Inherit\",\"False\",\"Property\",\"_ENABLE_RED\",\"_ENABLE_RED\",\"3\",\"0\",\"Create\",\"True\",\"0\",\"0\",\"0\",\"False\",\"0\",\"False\",\"\",\"0\",\"0\",\"0\",\"False\",\"_ENABLE_RED\",\"Toggle\",\"2\",\"RED\",\"GREEN\",\"Reference\",\"8\",\"True\",\"True\",\"All\",\"9\",\"1\",\"FLOAT3\",\"0,0,0\",\"False\",\"0\",\"FLOAT3\",\"0,0,0\",\"False\",\"2\",\"FLOAT3\",\"0,0,0\",\"False\",\"3\",\"FLOAT3\",\"0,0,0\",\"False\",\"4\",\"FLOAT3\",\"0,0,0\",\"False\",\"5\",\"FLOAT3\",\"0,0,0\",\"False\",\"6\",\"FLOAT3\",\"0,0,0\",\"False\",\"7\",\"FLOAT3\",\"0,0,0\",\"False\",\"8\",\"FLOAT3\",\"0,0,0\",\"False\",\"1\",\"FLOAT3\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.RangedFloatNode, + AmplifyShaderEditor\",\"id\":2,\"pos\":[-672,-208],\"params\":[\"Inherit\",\"False\",\"Property\",\"_SubEnum\",\"Sub + Enum\",\"1\",\"0\",\"Create\",\"True\",\"0\",\"0\",\"0\",\"True\",\"0\",\"False\",\"Object\",\"-1\",\"LWGUI:584:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRW51bURyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIkVudW0iLCJSIiwiMCIsIkciLCIxIiwiQiIsIjIiXSwiX2lzRGVjb3JhdG9yIjpmYWxzZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoic3RyaW5nIGdyb3VwLHN0cmluZyBuMSxzdHJpbmcgdjEsc3RyaW5nIG4yLHN0cmluZyB2MixzdHJpbmcgbjMsc3RyaW5nIHYzIiwiX25hbWVkUGFyYW1ldGVycyI6W3sibmFtZSI6Imdyb3VwIiwidmFsdWUiOiJFbnVtIn0seyJuYW1lIjoibjEiLCJ2YWx1ZSI6IlIifSx7Im5hbWUiOiJ2MSIsInZhbHVlIjoiMCJ9LHsibmFtZSI6Im4yIiwidmFsdWUiOiJHIn0seyJuYW1lIjoidjIiLCJ2YWx1ZSI6IjEifSx7Im5hbWUiOiJuMyIsInZhbHVlIjoiQiJ9LHsibmFtZSI6InYzIiwidmFsdWUiOiIyIn1dfSwiZGVjb3JhdG9ycyI6W119\",\"0\",\"0\",\"0\",\"0\",\"0\",\"1\",\"FLOAT\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.StaticSwitch, + AmplifyShaderEditor\",\"id\":8,\"pos\":[-64,96],\"params\":[\"Inherit\",\"False\",\"Property\",\"_ENABLE_\",\"_ENABLE_\",\"3\",\"0\",\"Create\",\"True\",\"0\",\"0\",\"0\",\"False\",\"0\",\"False\",\"\",\"0\",\"0\",\"0\",\"False\",\"_ENABLE\",\"KeywordEnum\",\"3\",\"RED\",\"GREEN\",\"BLUE\",\"Create\",\"True\",\"True\",\"All\",\"9\",\"1\",\"FLOAT3\",\"0,0,0\",\"False\",\"0\",\"FLOAT3\",\"0,0,0\",\"False\",\"2\",\"FLOAT3\",\"0,0,0\",\"False\",\"3\",\"FLOAT3\",\"0,0,0\",\"False\",\"4\",\"FLOAT3\",\"0,0,0\",\"False\",\"5\",\"FLOAT3\",\"0,0,0\",\"False\",\"6\",\"FLOAT3\",\"0,0,0\",\"False\",\"7\",\"FLOAT3\",\"0,0,0\",\"False\",\"8\",\"FLOAT3\",\"0,0,0\",\"False\",\"1\",\"FLOAT3\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.RangedFloatNode, + AmplifyShaderEditor\",\"id\":4,\"pos\":[-672,-32],\"params\":[\"Inherit\",\"False\",\"Property\",\"_KWEnum\",\"KW + Enum\",\"2\",\"0\",\"Create\",\"True\",\"0\",\"0\",\"0\",\"True\",\"0\",\"False\",\"Object\",\"-1\",\"LWGUI:696:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiS1dFbnVtRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiRW51bSIsIlJlZCIsIl9FTkFCTEVfUkVEIiwiR3JlZW4iLCJfRU5BQkxFX0dSRUVOIiwiQmx1ZSIsIl9FTkFCTEVfQkxVRSJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAsc3RyaW5nIG4xLHN0cmluZyBrMSxzdHJpbmcgbjIsc3RyaW5nIGsyLHN0cmluZyBuMyxzdHJpbmcgazMiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IkVudW0ifSx7Im5hbWUiOiJuMSIsInZhbHVlIjoiUmVkIn0seyJuYW1lIjoiazEiLCJ2YWx1ZSI6Il9FTkFCTEVfUkVEIn0seyJuYW1lIjoibjIiLCJ2YWx1ZSI6IkdyZWVuIn0seyJuYW1lIjoiazIiLCJ2YWx1ZSI6Il9FTkFCTEVfR1JFRU4ifSx7Im5hbWUiOiJuMyIsInZhbHVlIjoiQmx1ZSJ9LHsibmFtZSI6ImszIiwidmFsdWUiOiJfRU5BQkxFX0JMVUUifV19LCJkZWNvcmF0b3JzIjpbXX0=\",\"0\",\"0\",\"0\",\"0\",\"0\",\"1\",\"FLOAT\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.StaticSwitch, + AmplifyShaderEditor\",\"id\":23,\"pos\":[416,0],\"params\":[\"Inherit\",\"False\",\"Property\",\"_ENABLE_RED\",\"_ENABLE_RED\",\"3\",\"0\",\"Create\",\"True\",\"0\",\"0\",\"0\",\"False\",\"0\",\"False\",\"\",\"0\",\"0\",\"0\",\"False\",\"_ENABLE_RED\",\"Toggle\",\"2\",\"RED\",\"GREEN\",\"Fetch\",\"True\",\"True\",\"All\",\"9\",\"1\",\"FLOAT3\",\"0,0,0\",\"False\",\"0\",\"FLOAT3\",\"0,0,0\",\"False\",\"2\",\"FLOAT3\",\"0,0,0\",\"False\",\"3\",\"FLOAT3\",\"0,0,0\",\"False\",\"4\",\"FLOAT3\",\"0,0,0\",\"False\",\"5\",\"FLOAT3\",\"0,0,0\",\"False\",\"6\",\"FLOAT3\",\"0,0,0\",\"False\",\"7\",\"FLOAT3\",\"0,0,0\",\"False\",\"8\",\"FLOAT3\",\"0,0,0\",\"False\",\"1\",\"FLOAT3\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.RangedFloatNode, + AmplifyShaderEditor\",\"id\":25,\"pos\":[-672,640],\"params\":[\"Inherit\",\"False\",\"Property\",\"_SubKeywordEnum\",\"Sub + Keyword Enum\",\"3\",\"0\",\"Create\",\"True\",\"0\",\"0\",\"0\",\"True\",\"0\",\"False\",\"Object\",\"-1\",\"LWGUI:484:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViS2V5d29yZEVudW1EcmF3ZXIiLCJfcGFyYW1ldGVycyI6WyJFbnVtIiwiX0tFWV8xIiwiX0tFWV8yIiwiX0tFWV8zIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCxzdHJpbmcga3cxLHN0cmluZyBrdzIsc3RyaW5nIGt3MyIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiRW51bSJ9LHsibmFtZSI6Imt3MSIsInZhbHVlIjoiX0tFWV8xIn0seyJuYW1lIjoia3cyIiwidmFsdWUiOiJfS0VZXzIifSx7Im5hbWUiOiJrdzMiLCJ2YWx1ZSI6Il9LRVlfMyJ9XX0sImRlY29yYXRvcnMiOltdfQ==\",\"0\",\"0\",\"0\",\"0\",\"0\",\"1\",\"FLOAT\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.RangedFloatNode, + AmplifyShaderEditor\",\"id\":26,\"pos\":[-672,816],\"params\":[\"Inherit\",\"False\",\"Property\",\"_Preset\",\"Preset\",\"4\",\"0\",\"Create\",\"True\",\"0\",\"0\",\"0\",\"True\",\"0\",\"False\",\"Object\",\"-1\",\"LWGUI:416:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiUHJlc2V0RHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiRW51bSIsIkxXR1VJX1NoYWRlclByb3BlcnR5UHJlc2V0Il0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCxzdHJpbmcgcHJlc2V0RmlsZU5hbWUiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IkVudW0ifSx7Im5hbWUiOiJwcmVzZXRGaWxlTmFtZSIsInZhbHVlIjoiTFdHVUlfU2hhZGVyUHJvcGVydHlQcmVzZXQifV19LCJkZWNvcmF0b3JzIjpbXX0=\",\"0\",\"0\",\"0\",\"0\",\"0\",\"1\",\"FLOAT\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.RangedFloatNode, + AmplifyShaderEditor\",\"id\":27,\"pos\":[-672,880],\"params\":[\"Inherit\",\"False\",\"Property\",\"_float1\",\"Float + in Preset\",\"5\",\"0\",\"Create\",\"False\",\"0\",\"0\",\"0\",\"True\",\"0\",\"False\",\"Object\",\"-1\",\"LWGUI:260:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiRW51bSJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IkVudW0ifV19LCJkZWNvcmF0b3JzIjpbXX0=\",\"0\",\"0\",\"-1\",\"1\",\"0\",\"1\",\"FLOAT\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.RangedFloatNode, + AmplifyShaderEditor\",\"id\":3,\"pos\":[-672,-320],\"params\":[\"Inherit\",\"False\",\"Property\",\"_EnumGroup\",\"====== + Enum Group - ASE Function ======\",\"0\",\"0\",\"Create\",\"False\",\"0\",\"0\",\"0\",\"True\",\"0\",\"False\",\"Object\",\"-1\",\"LWGUI:536:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiTWFpbkRyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIkVudW0iLCIiLCJvbiIsIm9mZiJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAsa2V5d29yZCBrZXl3b3JkLGVudW0gZGVmYXVsdEZvbGRpbmdTdGF0ZSxlbnVtIGRlZmF1bHRUb2dnbGVEaXNwbGF5ZWQiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IkVudW0ifSx7Im5hbWUiOiJrZXl3b3JkIiwidmFsdWUiOiIifSx7Im5hbWUiOiJkZWZhdWx0Rm9sZGluZ1N0YXRlIiwidmFsdWUiOiJvbiJ9LHsibmFtZSI6ImRlZmF1bHRUb2dnbGVEaXNwbGF5ZWQiLCJ2YWx1ZSI6Im9mZiJ9XX0sImRlY29yYXRvcnMiOltdfQ==\",\"0\",\"0\",\"0\",\"0\",\"0\",\"1\",\"FLOAT\",\"0\"]}\n{\"type\":\"AmplifyShaderEditor.FunctionOutput, + AmplifyShaderEditor\",\"id\":0,\"pos\":[1184,96],\"params\":[\"Inherit\",\"False\",\"True\",\"-1\",\"Output\",\"0\",\"False\",\"1\",\"0\",\"FLOAT3\",\"0,0,0\",\"False\",\"1\",\"FLOAT3\",\"0\"]}\n{\"wire\":[8,1,12,5]}\n{\"wire\":[8,0,13,5]}\n{\"wire\":[8,2,18,5]}\n{\"wire\":[0,0,8,0]}\nASEEND*/\n//CHKSM=C6A415A3DAFB978DA4E2426281D9472F675AD1AC" m_functionName: m_description: m_additionalIncludes: @@ -64,6 +59,7 @@ MonoBehaviour: m_nativeDirectivesIndex: -1 m_nativeDirectivesFoldout: 0 m_directivesSaveItems: [] + m_versionMaxExclusive: 1 m_nodeCategory: 3 m_headerStyle: 0 m_headerColor: {r: 1, g: 0.4, b: 0, a: 1} diff --git a/Test/SampleAmplifyShader.shader b/Test/SampleAmplifyShader.shader index fa34e51..917b268 100644 --- a/Test/SampleAmplifyShader.shader +++ b/Test/SampleAmplifyShader.shader @@ -1,10 +1,10 @@ -// Made with Amplify Shader Editor v2.0.0 +// Made with Amplify Shader Editor v1.9.9.10 // Available at the Unity Asset Store - http://u3d.as/y3X Shader "New Amplify Shader" { Properties { - [Main(Numeric, _, on, off)] _NumericGroup( "====== Numeric Group ======", Float ) = 0 + [Main(Numeric, _, on, off)] _NumericGroupToenableASEintegrationyouneedtoInstallASEv19910EnableProjectSettingsLWGUIASEIntegration( "====== Numeric Group ======%To enable ASE integration, you need to:%- Install ASE v1.9.9.10+%- Enable: Project Settings > LWGUI > ASE Integration", Float ) = 0 [Sub(Numeric)] _Float( "Float", Float ) = 0 [Sub(Numeric)] _Range( "Range", Range( 0, 1 ) ) = 0 [SubPowerSlider(Numeric, 5)] _SubPowerSlider( "Sub Power Slider", Range( 0, 100 ) ) = 50 @@ -85,8 +85,12 @@ Shader "New Amplify Shader" LOD 0 + ZWrite On Cull Back AlphaToMask Off + ColorMask RGBA + Blend One Zero, One Zero + BlendOp Add, Add @@ -98,6 +102,8 @@ Shader "New Amplify Shader" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl" #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl" + #define ASE_ADJUST_CLIP_POSITION( x ) x + #ifndef ASE_TESS_FUNCS #define ASE_TESS_FUNCS float4 FixedTess( float tessValue ) @@ -208,11 +214,13 @@ Shader "New Amplify Shader" Name "Forward" Tags { "LightMode"="UniversalForwardOnly" } - Blend One Zero, One Zero + Cull Back ZWrite On ZTest LEqual Offset 0 , 0 ColorMask RGBA + Blend One Zero, One Zero + BlendOp Add, Add @@ -220,6 +228,7 @@ Shader "New Amplify Shader" + #define _NORMAL_DROPOFF_TS 1 #pragma shader_feature_local_fragment _RECEIVE_SHADOWS_OFF #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION #pragma multi_compile_instancing @@ -227,7 +236,7 @@ Shader "New Amplify Shader" #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG 1 - #define ASE_VERSION 20000 + #define ASE_VERSION 19910 #define ASE_SRP_VERSION 140012 @@ -287,7 +296,7 @@ Shader "New Amplify Shader" #pragma shader_feature_local _ENABLE_RED _ENABLE_GREEN _ENABLE_BLUE - #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) + #if defined(ASE_WRITE_DEPTH_CONSERVATIVE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else @@ -324,7 +333,6 @@ Shader "New Amplify Shader" float4 _Color; float4 _ColorG; float _Max; - float _ShowIfTrue1; float _ShowIfFalse0; float _ConditionDecoratorsGroup; float _Toggle; @@ -335,25 +343,26 @@ Shader "New Amplify Shader" float _Range; float _Range1; float _Float0; + float _Float; + float _ShowIfTrue1; float _ActiveIfTrue1; - float _PassSwitch; - float _VectorTextureGroup; float _Hidden; + float _HelpboxSample; float _Min; float _SubPowerSlider; float _SubIntRange; float _MinMaxSlider; - float _NumericGroup; float _SubEnum; - float _HelpboxSample; float _KWEnum; - float _Preset; + float _PassSwitch; + float _SubKeywordEnum; float _float1; float _EnumGroup; float _RampGroup; float _RampAtlasIndexer; - float _Float; - float _SubKeywordEnum; + float _VectorTextureGroup; + float _NumericGroupToenableASEintegrationyouneedtoInstallASEv19910EnableProjectSettingsLWGUIASEIntegration; + float _Preset; float _BitMask; float _AlphaClip; float _Cutoff; @@ -410,7 +419,7 @@ Shader "New Amplify Shader" fogFactor = ComputeFogFactor(vertexInput.positionCS.z); #endif - output.positionCS = vertexInput.positionCS; + output.positionCS = ASE_ADJUST_CLIP_POSITION( vertexInput.positionCS ); output.positionWSAndFogFactor = float4( vertexInput.positionWS, fogFactor ); output.normalWS = normalInput.normalWS; output.tangentWS = half4( normalInput.tangentWS, ( input.tangentOS.w > 0.0 ? 1.0 : -1.0 ) * GetOddNegativeScale() );; @@ -500,7 +509,7 @@ Shader "New Amplify Shader" #endif half4 frag ( PackedVaryings input - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) ,out float outputDepth : ASE_SV_DEPTH #endif #ifdef _WRITE_RENDERING_LAYERS @@ -557,6 +566,7 @@ Shader "New Amplify Shader" float3 BakedAlbedo = 0; float3 BakedEmission = 0; float3 Color = staticSwitch8_g4; + float3 Normal = float3(0, 0, 1); float Alpha = 1; #if defined( _ALPHATEST_ON ) float AlphaClipThreshold = _Cutoff; @@ -564,7 +574,7 @@ Shader "New Amplify Shader" #endif - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) input.positionCS.z = input.positionCS.z; #endif @@ -599,7 +609,7 @@ Shader "New Amplify Shader" #endif #endif - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) outputDepth = input.positionCS.z; #endif @@ -633,16 +643,17 @@ Shader "New Amplify Shader" + #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #define ASE_FOG 1 - #define ASE_VERSION 20000 + #define ASE_VERSION 19910 #define ASE_SRP_VERSION 140012 - #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + #pragma multi_compile _ _CASTING_PUNCTUAL_LIGHT_SHADOW // @diogo: removed _vertex for POM node #pragma vertex vert #pragma fragment frag @@ -666,7 +677,7 @@ Shader "New Amplify Shader" - #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) + #if defined(ASE_WRITE_DEPTH_CONSERVATIVE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else @@ -700,7 +711,6 @@ Shader "New Amplify Shader" float4 _Color; float4 _ColorG; float _Max; - float _ShowIfTrue1; float _ShowIfFalse0; float _ConditionDecoratorsGroup; float _Toggle; @@ -711,25 +721,26 @@ Shader "New Amplify Shader" float _Range; float _Range1; float _Float0; + float _Float; + float _ShowIfTrue1; float _ActiveIfTrue1; - float _PassSwitch; - float _VectorTextureGroup; float _Hidden; + float _HelpboxSample; float _Min; float _SubPowerSlider; float _SubIntRange; float _MinMaxSlider; - float _NumericGroup; float _SubEnum; - float _HelpboxSample; float _KWEnum; - float _Preset; + float _PassSwitch; + float _SubKeywordEnum; float _float1; float _EnumGroup; float _RampGroup; float _RampAtlasIndexer; - float _Float; - float _SubKeywordEnum; + float _VectorTextureGroup; + float _NumericGroupToenableASEintegrationyouneedtoInstallASEv19910EnableProjectSettingsLWGUIASEIntegration; + float _Preset; float _BitMask; float _AlphaClip; float _Cutoff; @@ -751,10 +762,10 @@ Shader "New Amplify Shader" sampler2D _TexwithFloat; - float3 _LightDirection; float3 _LightPosition; + PackedVaryings VertexFunction( Attributes input ) { PackedVaryings output; @@ -797,7 +808,7 @@ Shader "New Amplify Shader" positionCS.z = max(positionCS.z, UNITY_NEAR_CLIP_VALUE); #endif - output.positionCS = positionCS; + output.positionCS = ASE_ADJUST_CLIP_POSITION( positionCS ); return output; } @@ -881,7 +892,7 @@ Shader "New Amplify Shader" #endif half4 frag(PackedVaryings input - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) ,out float outputDepth : ASE_SV_DEPTH #endif ) : SV_Target @@ -901,7 +912,7 @@ Shader "New Amplify Shader" float AlphaClipThresholdShadow = 0.5; #endif - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) input.positionCS.z = input.positionCS.z; #endif @@ -917,7 +928,7 @@ Shader "New Amplify Shader" LODFadeCrossFade( input.positionCS ); #endif - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) outputDepth = input.positionCS.z; #endif @@ -941,10 +952,11 @@ Shader "New Amplify Shader" + #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #define ASE_FOG 1 - #define ASE_VERSION 20000 + #define ASE_VERSION 19910 #define ASE_SRP_VERSION 140012 @@ -970,7 +982,7 @@ Shader "New Amplify Shader" - #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) + #if defined(ASE_WRITE_DEPTH_CONSERVATIVE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else @@ -1004,7 +1016,6 @@ Shader "New Amplify Shader" float4 _Color; float4 _ColorG; float _Max; - float _ShowIfTrue1; float _ShowIfFalse0; float _ConditionDecoratorsGroup; float _Toggle; @@ -1015,25 +1026,26 @@ Shader "New Amplify Shader" float _Range; float _Range1; float _Float0; + float _Float; + float _ShowIfTrue1; float _ActiveIfTrue1; - float _PassSwitch; - float _VectorTextureGroup; float _Hidden; + float _HelpboxSample; float _Min; float _SubPowerSlider; float _SubIntRange; float _MinMaxSlider; - float _NumericGroup; float _SubEnum; - float _HelpboxSample; float _KWEnum; - float _Preset; + float _PassSwitch; + float _SubKeywordEnum; float _float1; float _EnumGroup; float _RampGroup; float _RampAtlasIndexer; - float _Float; - float _SubKeywordEnum; + float _VectorTextureGroup; + float _NumericGroupToenableASEintegrationyouneedtoInstallASEv19910EnableProjectSettingsLWGUIASEIntegration; + float _Preset; float _BitMask; float _AlphaClip; float _Cutoff; @@ -1055,6 +1067,9 @@ Shader "New Amplify Shader" sampler2D _TexwithFloat; + float3 _LightDirection; + float3 _LightPosition; + PackedVaryings VertexFunction( Attributes input ) { @@ -1081,7 +1096,7 @@ Shader "New Amplify Shader" VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); - output.positionCS = vertexInput.positionCS; + output.positionCS = ASE_ADJUST_CLIP_POSITION( vertexInput.positionCS ); return output; } @@ -1165,7 +1180,7 @@ Shader "New Amplify Shader" #endif half4 frag(PackedVaryings input - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) ,out float outputDepth : ASE_SV_DEPTH #endif ) : SV_Target @@ -1184,7 +1199,7 @@ Shader "New Amplify Shader" float AlphaClipThreshold = _Cutoff; #endif - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) input.positionCS.z = input.positionCS.z; #endif @@ -1196,7 +1211,7 @@ Shader "New Amplify Shader" LODFadeCrossFade( input.positionCS ); #endif - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) outputDepth = input.positionCS.z; #endif @@ -1219,8 +1234,9 @@ Shader "New Amplify Shader" + #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 - #define ASE_VERSION 20000 + #define ASE_VERSION 19910 #define ASE_SRP_VERSION 140012 @@ -1289,7 +1305,6 @@ Shader "New Amplify Shader" float4 _Color; float4 _ColorG; float _Max; - float _ShowIfTrue1; float _ShowIfFalse0; float _ConditionDecoratorsGroup; float _Toggle; @@ -1300,25 +1315,26 @@ Shader "New Amplify Shader" float _Range; float _Range1; float _Float0; + float _Float; + float _ShowIfTrue1; float _ActiveIfTrue1; - float _PassSwitch; - float _VectorTextureGroup; float _Hidden; + float _HelpboxSample; float _Min; float _SubPowerSlider; float _SubIntRange; float _MinMaxSlider; - float _NumericGroup; float _SubEnum; - float _HelpboxSample; float _KWEnum; - float _Preset; + float _PassSwitch; + float _SubKeywordEnum; float _float1; float _EnumGroup; float _RampGroup; float _RampAtlasIndexer; - float _Float; - float _SubKeywordEnum; + float _VectorTextureGroup; + float _NumericGroupToenableASEintegrationyouneedtoInstallASEv19910EnableProjectSettingsLWGUIASEIntegration; + float _Preset; float _BitMask; float _AlphaClip; float _Cutoff; @@ -1377,7 +1393,7 @@ Shader "New Amplify Shader" VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); - output.positionCS = vertexInput.positionCS; + output.positionCS = ASE_ADJUST_CLIP_POSITION( vertexInput.positionCS ); return output; } @@ -1494,8 +1510,9 @@ Shader "New Amplify Shader" + #define _NORMAL_DROPOFF_TS 1 #define ASE_FOG 1 - #define ASE_VERSION 20000 + #define ASE_VERSION 19910 #define ASE_SRP_VERSION 140012 @@ -1569,7 +1586,6 @@ Shader "New Amplify Shader" float4 _Color; float4 _ColorG; float _Max; - float _ShowIfTrue1; float _ShowIfFalse0; float _ConditionDecoratorsGroup; float _Toggle; @@ -1580,25 +1596,26 @@ Shader "New Amplify Shader" float _Range; float _Range1; float _Float0; + float _Float; + float _ShowIfTrue1; float _ActiveIfTrue1; - float _PassSwitch; - float _VectorTextureGroup; float _Hidden; + float _HelpboxSample; float _Min; float _SubPowerSlider; float _SubIntRange; float _MinMaxSlider; - float _NumericGroup; float _SubEnum; - float _HelpboxSample; float _KWEnum; - float _Preset; + float _PassSwitch; + float _SubKeywordEnum; float _float1; float _EnumGroup; float _RampGroup; float _RampAtlasIndexer; - float _Float; - float _SubKeywordEnum; + float _VectorTextureGroup; + float _NumericGroupToenableASEintegrationyouneedtoInstallASEv19910EnableProjectSettingsLWGUIASEIntegration; + float _Preset; float _BitMask; float _AlphaClip; float _Cutoff; @@ -1656,7 +1673,7 @@ Shader "New Amplify Shader" VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); - output.positionCS = vertexInput.positionCS; + output.positionCS = ASE_ADJUST_CLIP_POSITION( vertexInput.positionCS ); return output; } @@ -1777,10 +1794,11 @@ Shader "New Amplify Shader" + #define _NORMAL_DROPOFF_TS 1 #pragma multi_compile_instancing #pragma multi_compile_fragment _ LOD_FADE_CROSSFADE #define ASE_FOG 1 - #define ASE_VERSION 20000 + #define ASE_VERSION 19910 #define ASE_SRP_VERSION 140012 @@ -1796,6 +1814,7 @@ Shader "New Amplify Shader" #define ATTRIBUTES_NEED_NORMAL #define ATTRIBUTES_NEED_TANGENT #define VARYINGS_NEED_NORMAL_WS + #define VARYINGS_NEED_TANGENT_WS #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY @@ -1833,7 +1852,7 @@ Shader "New Amplify Shader" - #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) + #if defined(ASE_WRITE_DEPTH_CONSERVATIVE) && (SHADER_TARGET >= 45) #define ASE_SV_DEPTH SV_DepthLessEqual #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid #else @@ -1854,6 +1873,7 @@ Shader "New Amplify Shader" { ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; half3 normalWS : TEXCOORD0; + float4 tangentWS : TEXCOORD1; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO @@ -1868,7 +1888,6 @@ Shader "New Amplify Shader" float4 _Color; float4 _ColorG; float _Max; - float _ShowIfTrue1; float _ShowIfFalse0; float _ConditionDecoratorsGroup; float _Toggle; @@ -1879,25 +1898,26 @@ Shader "New Amplify Shader" float _Range; float _Range1; float _Float0; + float _Float; + float _ShowIfTrue1; float _ActiveIfTrue1; - float _PassSwitch; - float _VectorTextureGroup; float _Hidden; + float _HelpboxSample; float _Min; float _SubPowerSlider; float _SubIntRange; float _MinMaxSlider; - float _NumericGroup; float _SubEnum; - float _HelpboxSample; float _KWEnum; - float _Preset; + float _PassSwitch; + float _SubKeywordEnum; float _float1; float _EnumGroup; float _RampGroup; float _RampAtlasIndexer; - float _Float; - float _SubKeywordEnum; + float _VectorTextureGroup; + float _NumericGroupToenableASEintegrationyouneedtoInstallASEv19910EnableProjectSettingsLWGUIASEIntegration; + float _Preset; float _BitMask; float _AlphaClip; float _Cutoff; @@ -1954,10 +1974,11 @@ Shader "New Amplify Shader" input.tangentOS = input.tangentOS; VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); - VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS ); + VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS, input.tangentOS ); - output.positionCS = vertexInput.positionCS; + output.positionCS = ASE_ADJUST_CLIP_POSITION( vertexInput.positionCS ); output.normalWS = normalInput.normalWS; + output.tangentWS = float4( normalInput.tangentWS, ( input.tangentOS.w > 0.0 ? 1.0 : -1.0 ) * GetOddNegativeScale() ); return output; } @@ -1966,6 +1987,7 @@ Shader "New Amplify Shader" { float4 positionOS : INTERNALTESSPOS; half3 normalOS : NORMAL; + half4 tangentOS : TANGENT; UNITY_VERTEX_INPUT_INSTANCE_ID }; @@ -1983,6 +2005,7 @@ Shader "New Amplify Shader" UNITY_TRANSFER_INSTANCE_ID(input, output); output.positionOS = input.positionOS; output.normalOS = input.normalOS; + output.tangentOS = input.tangentOS; return output; } @@ -2022,6 +2045,7 @@ Shader "New Amplify Shader" Attributes output = (Attributes) 0; output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z; #if defined(ASE_PHONG_TESSELLATION) float3 pp[3]; @@ -2042,7 +2066,7 @@ Shader "New Amplify Shader" void frag(PackedVaryings input , out half4 outNormalWS : SV_Target0 - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) ,out float outputDepth : ASE_SV_DEPTH #endif #ifdef _WRITE_RENDERING_LAYERS @@ -2053,19 +2077,25 @@ Shader "New Amplify Shader" UNITY_SETUP_INSTANCE_ID(input); UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input ); - half3 NormalWS = normalize( input.normalWS ); + // @diogo: mikktspace compliant + float renormFactor = 1.0 / max( FLT_MIN, length( input.normalWS ) ); + + float3 NormalWS = input.normalWS * renormFactor; + float3 TangentWS = input.tangentWS.xyz * renormFactor; + float3 BitangentWS = cross( input.normalWS, input.tangentWS.xyz ) * input.tangentWS.w * renormFactor; float4 ScreenPosNorm = float4( GetNormalizedScreenSpaceUV( input.positionCS ), input.positionCS.zw ); float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, input.positionCS.z ) * input.positionCS.w; float4 ScreenPos = ComputeScreenPos( ClipPos ); + float3 Normal = float3(0, 0, 1); float Alpha = 1; #if defined( _ALPHATEST_ON ) float AlphaClipThreshold = _Cutoff; #endif - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) input.positionCS.z = input.positionCS.z; #endif @@ -2077,7 +2107,7 @@ Shader "New Amplify Shader" LODFadeCrossFade( input.positionCS ); #endif - #if defined( ASE_DEPTH_WRITE_ON ) + #if defined( ASE_WRITE_DEPTH ) outputDepth = input.positionCS.z; #endif @@ -2087,7 +2117,18 @@ Shader "New Amplify Shader" half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS); outNormalWS = half4(packedNormalWS, 0.0); #else - outNormalWS = half4(NormalizeNormalPerPixel( NormalWS ), 0.0); + #if defined(_NORMALMAP) + #if _NORMAL_DROPOFF_TS + float3 normalWS = TransformTangentToWorld(Normal, half3x3(TangentWS, BitangentWS, NormalWS)); + #elif _NORMAL_DROPOFF_OS + float3 normalWS = TransformObjectToWorldNormal(Normal); + #elif _NORMAL_DROPOFF_WS + float3 normalWS = Normal; + #endif + #else + float3 normalWS = NormalWS; + #endif + outNormalWS = half4(NormalizeNormalPerPixel(normalWS), 0.0); #endif #ifdef _WRITE_RENDERING_LAYERS @@ -2110,64 +2151,64 @@ Shader "New Amplify Shader" Fallback Off } /*ASEBEGIN -Version=20000 -Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;53;-864,3872;Inherit;False;628.9534;920.3547;Out of Group;5;52;49;51;50;48;;1,1,1,1;0;0 -Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;11;-848,896;Inherit;False;1356.853;1478.783;Vector Group;5;32;31;54;55;56;;1,1,1,1;0;0 -Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;41;-848,3088;Inherit;False;589.4493;699.1997;Condition Decorators Group;6;47;45;44;42;43;40;;1,1,1,1;0;0 -Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;39;-800,1040;Inherit;False;1311.946;286.7615;Color and other Drawers will reference the names of other Properties. Currently, you must manually lock these Property names to prevent the auto-generated names from changing.;4;27;30;29;28;;1,1,1,1;0;0 -Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;10;-848,2416;Inherit;False;668.1052;615.8208;Appearance Decorators Group;6;37;33;36;35;34;46;;1,1,1,1;0;0 -Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;12;-848,144;Inherit;False;557.5201;697.4403;Ramp Group;4;26;25;22;21;;1,1,1,1;0;0 -Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;13;-848,-720;Inherit;False;675.7715;709.7142;Numeric Group;9;16;17;23;20;19;18;15;14;57;;1,1,1,1;0;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;14;-512,-192;Inherit;False;Property;_Max;_Max;7;0;Create;True;0;0;0;True;0;False;0;1;HiddenDecorator;;0;0;1;0;-1;1;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;15;-512,-256;Inherit;False;Property;_Min;_Min;6;0;Create;True;0;0;0;True;0;False;0;1;HiddenDecorator;;0;0;-1;0;-1;1;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;18;-784,-432;Inherit;False;Property;_SubPowerSlider;Sub Power Slider;3;0;Create;True;0;0;0;True;0;False;1;SubPowerSliderDrawer;string group,float power;2;Numeric;5;2;group;Numeric;power;5;0;50;0;0;100;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;19;-784,-352;Inherit;False;Property;_SubIntRange;Sub Int Range;4;0;Create;True;0;0;0;True;0;False;1;SubIntRangeDrawer;string group;1;Numeric;1;group;Numeric;0;0;0;-10;10;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;20;-784,-240;Inherit;False;Property;_MinMaxSlider;Min Max Slider;5;0;Create;True;0;0;0;True;0;False;1;MinMaxSliderDrawer;string group,string minPropName,string maxPropName;3;Numeric;_Min;_Max;3;group;Numeric;minPropName;_Min;maxPropName;_Max;0;0;0;-1;1;0;1;FLOAT;0 -Node;AmplifyShaderEditor.TexturePropertyNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;21;-784,288;Inherit;True;Property;_Ramp;Ramp;17;0;Create;True;0;0;0;True;0;False;1;RampDrawer;string group;1;Ramp;1;group;Ramp;0;1522a7c4f7317044ab912724c1594427;1522a7c4f7317044ab912724c1594427;False;white;Auto;Texture2D;False;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 -Node;AmplifyShaderEditor.TexturePropertyNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;22;-784,496;Inherit;True;Property;_RampAtlas;Ramp Atlas;18;0;Create;True;0;0;0;True;0;False;1;RampAtlasDrawer;string group;1;Ramp;1;group;Ramp;0;cfbe5a628e96c0d4bae3645ad922a368;cfbe5a628e96c0d4bae3645ad922a368;False;white;Auto;Texture2D;False;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 -Node;AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;24;-784,16;Inherit;False;SampleAmplifyFunction_Enum;9;;4;47c66267a97c66a4f950ad83bd0e4064;0;0;1;FLOAT3;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;25;-784,192;Inherit;False;Property;_RampGroup;====== Ramp Group ======;16;0;Create;True;0;0;0;True;0;False;1;MainDrawer;string group,keyword keyword,enum defaultFoldingState,enum defaultToggleDisplayed;4;Ramp;;on;on;4;group;Ramp;keyword;;defaultFoldingState;on;defaultToggleDisplayed;on;0;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;26;-784,720;Inherit;False;Property;_RampAtlasIndexer;Ramp Atlas Indexer;19;0;Create;True;0;0;0;True;0;False;1;RampAtlasIndexerDrawer;string group,string rampAtlasPropName;2;Ramp;_RampAtlas;2;group;Ramp;rampAtlasPropName;_RampAtlas;0;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;27;-528,1104;Inherit;False;Property;_ColorG;Color G;22;1;[HideInInspector];Create;False;0;0;0;True;0;False;0;0;0,1,0,1;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 -Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;30;-736,1104;Inherit;False;Property;_Color;Color;21;0;Create;True;0;0;0;True;0;False;1;ColorDrawer;string group,string color2,string color3,string color4;4;Vector;_ColorG;_ColorB;_ColorA;4;group;Vector;color2;_ColorG;color3;_ColorB;color4;_ColorA;0;1,0,0,1;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 -Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;28;-320,1104;Inherit;False;Property;_ColorB;Color B;23;1;[HideInInspector];Create;False;0;0;0;True;0;False;0;0;0,0,1,1;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 -Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;29;-112,1104;Inherit;False;Property;_ColorA;Color A;24;1;[HideInInspector];Create;False;0;0;0;True;0;False;0;0;1,1,1,1;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 -Node;AmplifyShaderEditor.Vector4Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;31;-800,1360;Inherit;False;Property;_Channel;Channel;25;0;Create;False;0;0;0;True;0;False;1;ChannelDrawer;string group;1;Vector;1;group;Vector;0;0,1,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;32;-800,944;Inherit;False;Property;_VectorTextureGroup;====== Vector / Texture Group ======;20;0;Create;True;0;0;0;True;0;False;1;MainDrawer;string group,keyword keyword,enum defaultFoldingState,enum defaultToggleDisplayed;4;Vector;;on;on;4;group;Vector;keyword;;defaultFoldingState;on;defaultToggleDisplayed;on;0;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;46;-800,2944;Inherit;False;Property;_Hidden;Hidden;34;0;Create;True;0;0;0;True;0;False;1;SubDrawer;string group;1;Appearance;1;group;Appearance;1;HiddenDecorator;;0;0;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;35;-800,2656;Inherit;False;Property;_HelpboxSample;Multilingual Helpbox%Hello, world!%你好, 世界!%안녕, 세계!%%;31;0;Create;False;0;0;0;True;0;False;1;SubDrawer;string group;1;Appearance;1;group;Appearance;1;HelpboxDecorator;string s1,string s2,string s3;3;Helpbox 1;Helpbox 2;Helpbox 3;3;s1;Helpbox 1;s2;Helpbox 2;s3;Helpbox 3;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;47;-816,3648;Inherit;False;Property;_PassSwitch;Pass Switch;40;0;Create;True;0;0;0;True;0;False;1;SubToggleDrawer;string group;1;Condition;1;group;Condition;1;PassSwitchDecorator;passname lightModeName1;1;UniversalForwardOnly;1;lightModeName1;UniversalForwardOnly;1;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;45;-816,3552;Inherit;False;Property;_ActiveIfTrue1;Active If True (1);39;0;Create;True;0;0;0;True;0;False;1;SubDrawer;string group;1;Condition;1;group;Condition;1;ActiveIfDecorator;enum logicalOperator,string propNameOrKeyword,enum compareFunction,float value;4;;_Toggle;;1;3;propNameOrKeyword;_Toggle;comparisonMethod;;value;1;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;44;-816,3440;Inherit;False;Property;_ShowIfTrue1;Show If True (1);38;0;Create;True;0;0;0;True;0;False;1;SubDrawer;string group;1;Condition;1;group;Condition;1;ShowIfDecorator;string propNameOrKeyword,enum compareFunction,float value;3;_Toggle;;1;3;propNameOrKeyword;_Toggle;compareFunction;;value;1;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;43;-816,3344;Inherit;False;Property;_ShowIfFalse0;Show If False (0);37;0;Create;True;0;0;0;True;0;False;1;SubDrawer;string group;1;Condition;1;group;Condition;1;ShowIfDecorator;string propNameOrKeyword,enum compareFunction,float value;3;_Toggle;;;3;propNameOrKeyword;_Toggle;compareFunction;;value;;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;40;-816,3152;Inherit;False;Property;_ConditionDecoratorsGroup;====== Condition Decorators Group ======;35;0;Create;True;0;0;0;True;0;False;1;MainDrawer;string group,keyword keyword,enum defaultFoldingState;3;Condition;;on;3;group;Condition;keyword;;defaultFoldingState;on;0;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;42;-816,3248;Inherit;False;Property;_Toggle;Toggle;36;0;Create;False;0;0;0;True;0;False;1;SubToggleDrawer;string group;1;Condition;1;group;Condition;0;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;37;-800,2848;Inherit;False;Property;_ReadOnly;Read Only;33;0;Create;True;0;0;0;True;0;False;1;SubDrawer;string group;1;Appearance;1;group;Appearance;1;ReadOnlyDecorator;;0;0;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;34;-800,2736;Inherit;False;Property;_TooltipSample;Multilingual Tooltip#Hello, world#你好, 世界!#안녕, 세계!#;32;0;Create;False;0;0;0;True;0;False;1;SubDrawer;string group;1;Appearance;1;group;Appearance;1;TooltipDecorator;string s1,string s2,string s3;3;Tooltip 1;Tooltip 2;Tooltip 3;3;s1;Tooltip 1;s2;Tooltip 2;s3;Tooltip 3;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;33;-800,2464;Inherit;False;Property;_AppearanceDecoratorsGroup;====== Appearance Decorators Group ======;29;0;Create;True;0;0;0;True;0;False;1;MainDrawer;string group,keyword keyword,enum defaultFoldingState;3;Appearance;;on;3;group;Appearance;keyword;;defaultFoldingState;on;1;HelpURLDecorator;string s1,string s2,string s3;3;github.com;JasonMa0012;LWGUI;3;s1;github.com;s2;JasonMa0012;s3;LWGUI;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;36;-800,2576;Inherit;False;Property;_Title;Title;30;0;Create;True;0;0;0;True;0;False;1;SubDrawer;string group;1;Appearance;1;group;Appearance;1;TitleDecorator;string group,string header;2;Appearance;Title;2;group;Appearance;header;Title;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;49;-816,4480;Inherit;True;Property;_TextureSample0;Texture Sample 0;45;0;Create;True;0;0;0;True;0;False;0;0;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;False;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 -Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;52;-816,4288;Inherit;False;Property;_Color0;Color 0;44;0;Create;True;0;0;0;True;0;False;0;0;0,0,0,0;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 -Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;54;-800,1552;Inherit;True;Property;_TexwithChannel;Tex with Channel;26;0;Create;True;0;0;0;True;0;False;1;TexDrawer;string group,string extraPropName;2;Vector;_Channel;2;group;Vector;extraPropName;_Channel;0;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;False;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;17;-784,-512;Inherit;False;Property;_Range;Range;2;0;Create;False;0;0;0;True;0;False;1;SubDrawer;string group;1;Numeric;1;group;Numeric;0;0;0;0;1;0;1;FLOAT;0 -Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;55;-800,1776;Inherit;True;Property;_TexwithRange;Tex with Range;27;0;Create;True;0;0;0;True;0;False;1;TexDrawer;string group,string extraPropName;2;Vector;_Range;2;group;Vector;extraPropName;_Range;0;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;False;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 -Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;56;-800,2000;Inherit;True;Property;_TexwithFloat;Tex with Float;28;0;Create;True;0;0;0;True;0;False;1;TexDrawer;string group,string extraPropName;2;Vector;_Float;2;group;Vector;extraPropName;_Float;0;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;False;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;51;-816,4032;Inherit;False;Property;_Range1;Range 1;42;0;Create;True;0;0;0;True;0;False;0;0;0.5;0;0;1;0;1;FLOAT;0 -Node;AmplifyShaderEditor.Vector4Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;50;-816,4112;Inherit;False;Property;_Vector0;Vector 0;43;0;Create;True;0;0;0;True;0;False;0;0;0,0,0,0;0,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;48;-816,3952;Inherit;False;Property;_Float0;Float 0;41;0;Create;True;0;0;0;True;0;False;0;1;TitleDecorator;string header;1;Out of Group;1;header;Out of Group;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;16;-784,-592;Inherit;False;Property;_Float;Float;1;0;Create;False;0;0;0;True;0;False;1;SubDrawer;string group;1;Numeric;1;group;Numeric;0;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;23;-816,-672;Inherit;False;Property;_NumericGroup;====== Numeric Group ======;0;0;Create;True;0;0;0;True;0;False;1;MainDrawer;string group,keyword keyword,enum defaultFoldingState,enum defaultToggleDisplayed;4;Numeric;;on;off;4;group;Numeric;keyword;;defaultFoldingState;on;defaultToggleDisplayed;off;0;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;57;-784,-112;Inherit;False;Property;_BitMask;Bit Mask;8;0;Create;True;0;0;0;True;0;False;1;BitMaskDrawer;string group;1;Numeric;1;group;Numeric;0;0;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;0;0,0;Float;False;False;-1;3;LWGUI.LWGUI;0;19;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;6;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;False;True;0;False;False;0;;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;2;0,0;Float;False;False;-1;3;LWGUI.LWGUI;0;19;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;3;0,0;Float;False;False;-1;3;LWGUI.LWGUI;0;19;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;True;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;4;0,0;Float;False;False;-1;3;LWGUI.LWGUI;0;19;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;5;0,0;Float;False;False;-1;3;LWGUI.LWGUI;0;19;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;False;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;6;0,0;Float;False;False;-1;3;LWGUI.LWGUI;0;19;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;7;0,0;Float;False;False;-1;3;LWGUI.LWGUI;0;19;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;8;0,0;Float;False;False;-1;3;LWGUI.LWGUI;0;19;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;9;0,0;Float;False;False;-1;3;LWGUI.LWGUI;0;19;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;1;16,16;Float;False;True;-1;3;LWGUI.LWGUI;0;19;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;10;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;1;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;False;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;27;Surface;0;0; Keep Alpha;0;0; Blend;0;0;Two Sided;1;0;Alpha Clipping;0;0; Use Shadow Threshold;0;0;Forward Only;0;0;Cast Shadows;1;0;Receive Shadows;2;0;Receive SSAO;1;0;GPU Instancing;1;0;LOD CrossFade;1;0;Built-in Fog;1;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Write Depth;0;0; Early Z;0;0;Vertex Position;1;0;0;10;False;True;True;True;False;False;True;True;True;False;False;;False;0 -WireConnection;1;2;24;0 +Version=19910 +{"type":"AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor","id":53,"pos":[-864,3872],"params":["Inherit","False","628.9534","920.3547","Out of Group","5","52","49","51","50","48","","1,1,1,1","0","0"]} +{"type":"AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor","id":11,"pos":[-848,896],"params":["Inherit","False","1356.853","1478.783","Vector Group","5","32","31","54","55","56","","1,1,1,1","0","0"]} +{"type":"AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor","id":41,"pos":[-848,3088],"params":["Inherit","False","589.4493","699.1997","Condition Decorators Group","6","47","45","44","42","43","40","","1,1,1,1","0","0"]} +{"type":"AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor","id":39,"pos":[-800,1040],"params":["Inherit","False","1311.946","286.7615","Color and other Drawers will reference the names of other Properties. Currently, you must manually lock these Property names to prevent the auto-generated names from changing.","4","27","30","29","28","","1,1,1,1","0","0"]} +{"type":"AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor","id":10,"pos":[-848,2416],"params":["Inherit","False","668.1052","615.8208","Appearance Decorators Group","6","37","33","36","35","34","46","","1,1,1,1","0","0"]} +{"type":"AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor","id":12,"pos":[-848,144],"params":["Inherit","False","557.5201","697.4403","Ramp Group","4","26","25","22","21","","1,1,1,1","0","0"]} +{"type":"AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor","id":13,"pos":[-848,-720],"params":["Inherit","False","675.7715","709.7142","Numeric Group","9","16","17","23","20","19","18","15","14","57","","1,1,1,1","0","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":14,"pos":[-512,-192],"params":["Inherit","False","Property","_Max","_Max","7","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:348:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiIiwiX3BhcmFtZXRlcnMiOltdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiIiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbXX0sImRlY29yYXRvcnMiOlt7Il9kcmF3ZXJUeXBlTmFtZSI6IkhpZGRlbkRlY29yYXRvciIsIl9wYXJhbWV0ZXJzIjpbXSwiX2lzRGVjb3JhdG9yIjp0cnVlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiIiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbXX1dfQ==","1","0","-1","1","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":15,"pos":[-512,-256],"params":["Inherit","False","Property","_Min","_Min","6","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:348:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiIiwiX3BhcmFtZXRlcnMiOltdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiIiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbXX0sImRlY29yYXRvcnMiOlt7Il9kcmF3ZXJUeXBlTmFtZSI6IkhpZGRlbkRlY29yYXRvciIsIl9wYXJhbWV0ZXJzIjpbXSwiX2lzRGVjb3JhdG9yIjp0cnVlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiIiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbXX1dfQ==","-1","0","-1","1","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":19,"pos":[-784,-352],"params":["Inherit","False","Property","_SubIntRange","Sub Int Range","4","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:280:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViSW50UmFuZ2VEcmF3ZXIiLCJfcGFyYW1ldGVycyI6WyJOdW1lcmljIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiTnVtZXJpYyJ9XX0sImRlY29yYXRvcnMiOltdfQ==","0","0","-10","10","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":20,"pos":[-784,-240],"params":["Inherit","False","Property","_MinMaxSlider","Min Max Slider","5","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:452:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiTWluTWF4U2xpZGVyRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiTnVtZXJpYyIsIl9NaW4iLCJfTWF4Il0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCxzdHJpbmcgbWluUHJvcE5hbWUsc3RyaW5nIG1heFByb3BOYW1lIiwiX25hbWVkUGFyYW1ldGVycyI6W3sibmFtZSI6Imdyb3VwIiwidmFsdWUiOiJOdW1lcmljIn0seyJuYW1lIjoibWluUHJvcE5hbWUiLCJ2YWx1ZSI6Il9NaW4ifSx7Im5hbWUiOiJtYXhQcm9wTmFtZSIsInZhbHVlIjoiX01heCJ9XX0sImRlY29yYXRvcnMiOltdfQ==","0","0","-1","1","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.TexturePropertyNode, AmplifyShaderEditor","id":21,"pos":[-784,288],"params":["Inherit","True","Property","_Ramp","Ramp","17","0","Create","True","0","0","0","True","0","False","LWGUI:260:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiUmFtcERyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIlJhbXAiXSwiX2lzRGVjb3JhdG9yIjpmYWxzZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoic3RyaW5nIGdyb3VwIiwiX25hbWVkUGFyYW1ldGVycyI6W3sibmFtZSI6Imdyb3VwIiwidmFsdWUiOiJSYW1wIn1dfSwiZGVjb3JhdG9ycyI6W119","1522a7c4f7317044ab912724c1594427","1522a7c4f7317044ab912724c1594427","False","white","Auto","Texture2D","False","-1","0","2","SAMPLER2D","0","SAMPLERSTATE","1"]} +{"type":"AmplifyShaderEditor.TexturePropertyNode, AmplifyShaderEditor","id":22,"pos":[-784,496],"params":["Inherit","True","Property","_RampAtlas","Ramp Atlas","18","0","Create","True","0","0","0","True","0","False","LWGUI:268:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiUmFtcEF0bGFzRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiUmFtcCJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IlJhbXAifV19LCJkZWNvcmF0b3JzIjpbXX0=","cfbe5a628e96c0d4bae3645ad922a368","cfbe5a628e96c0d4bae3645ad922a368","False","white","Auto","Texture2D","False","-1","0","2","SAMPLER2D","0","SAMPLERSTATE","1"]} +{"type":"AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor","id":24,"pos":[-784,16],"params":["Inherit","False","SampleAmplifyFunction_Enum","9","","4","47c66267a97c66a4f950ad83bd0e4064","0","0","1","FLOAT3","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":25,"pos":[-784,192],"params":["Inherit","False","Property","_RampGroup","====== Ramp Group ======","16","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:532:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiTWFpbkRyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIlJhbXAiLCIiLCJvbiIsIm9uIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCxrZXl3b3JkIGtleXdvcmQsZW51bSBkZWZhdWx0Rm9sZGluZ1N0YXRlLGVudW0gZGVmYXVsdFRvZ2dsZURpc3BsYXllZCIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiUmFtcCJ9LHsibmFtZSI6ImtleXdvcmQiLCJ2YWx1ZSI6IiJ9LHsibmFtZSI6ImRlZmF1bHRGb2xkaW5nU3RhdGUiLCJ2YWx1ZSI6Im9uIn0seyJuYW1lIjoiZGVmYXVsdFRvZ2dsZURpc3BsYXllZCIsInZhbHVlIjoib24ifV19LCJkZWNvcmF0b3JzIjpbXX0=","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":26,"pos":[-784,720],"params":["Inherit","False","Property","_RampAtlasIndexer","Ramp Atlas Indexer","19","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:396:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiUmFtcEF0bGFzSW5kZXhlckRyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIlJhbXAiLCJfUmFtcEF0bGFzIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCxzdHJpbmcgcmFtcEF0bGFzUHJvcE5hbWUiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IlJhbXAifSx7Im5hbWUiOiJyYW1wQXRsYXNQcm9wTmFtZSIsInZhbHVlIjoiX1JhbXBBdGxhcyJ9XX0sImRlY29yYXRvcnMiOltdfQ==","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.ColorNode, AmplifyShaderEditor","id":27,"pos":[-528,1104],"params":["Inherit","False","Property","_ColorG","Color G","22","1","[HideInInspector]","Create","False","0","0","0","True","0","False","Object","-1","","0,1,0,1","0,0,0,0","True","True","0","6","COLOR","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4","FLOAT3","5"]} +{"type":"AmplifyShaderEditor.ColorNode, AmplifyShaderEditor","id":30,"pos":[-736,1104],"params":["Inherit","False","Property","_Color","Color","21","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:508:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiQ29sb3JEcmF3ZXIiLCJfcGFyYW1ldGVycyI6WyJWZWN0b3IiLCJfQ29sb3JHIiwiX0NvbG9yQiIsIl9Db2xvckEiXSwiX2lzRGVjb3JhdG9yIjpmYWxzZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoic3RyaW5nIGdyb3VwLHN0cmluZyBjb2xvcjIsc3RyaW5nIGNvbG9yMyxzdHJpbmcgY29sb3I0IiwiX25hbWVkUGFyYW1ldGVycyI6W3sibmFtZSI6Imdyb3VwIiwidmFsdWUiOiJWZWN0b3IifSx7Im5hbWUiOiJjb2xvcjIiLCJ2YWx1ZSI6Il9Db2xvckcifSx7Im5hbWUiOiJjb2xvcjMiLCJ2YWx1ZSI6Il9Db2xvckIifSx7Im5hbWUiOiJjb2xvcjQiLCJ2YWx1ZSI6Il9Db2xvckEifV19LCJkZWNvcmF0b3JzIjpbXX0=","1,0,0,1","0,0,0,0","True","True","0","6","COLOR","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4","FLOAT3","5"]} +{"type":"AmplifyShaderEditor.ColorNode, AmplifyShaderEditor","id":28,"pos":[-320,1104],"params":["Inherit","False","Property","_ColorB","Color B","23","1","[HideInInspector]","Create","False","0","0","0","True","0","False","Object","-1","","0,0,1,1","0,0,0,0","True","True","0","6","COLOR","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4","FLOAT3","5"]} +{"type":"AmplifyShaderEditor.ColorNode, AmplifyShaderEditor","id":29,"pos":[-112,1104],"params":["Inherit","False","Property","_ColorA","Color A","24","1","[HideInInspector]","Create","False","0","0","0","True","0","False","Object","-1","","1,1,1,1","0,0,0,0","True","True","0","6","COLOR","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4","FLOAT3","5"]} +{"type":"AmplifyShaderEditor.Vector4Node, AmplifyShaderEditor","id":31,"pos":[-800,1360],"params":["Inherit","False","Property","_Channel","Channel","25","0","Create","False","0","0","0","True","0","False","Object","-1","LWGUI:272:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiQ2hhbm5lbERyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIlZlY3RvciJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IlZlY3RvciJ9XX0sImRlY29yYXRvcnMiOltdfQ==","0,1,0,0","0,0,0,0","0","5","FLOAT4","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":32,"pos":[-800,944],"params":["Inherit","False","Property","_VectorTextureGroup","====== Vector / Texture Group ======","20","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:536:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiTWFpbkRyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIlZlY3RvciIsIiIsIm9uIiwib24iXSwiX2lzRGVjb3JhdG9yIjpmYWxzZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoic3RyaW5nIGdyb3VwLGtleXdvcmQga2V5d29yZCxlbnVtIGRlZmF1bHRGb2xkaW5nU3RhdGUsZW51bSBkZWZhdWx0VG9nZ2xlRGlzcGxheWVkIiwiX25hbWVkUGFyYW1ldGVycyI6W3sibmFtZSI6Imdyb3VwIiwidmFsdWUiOiJWZWN0b3IifSx7Im5hbWUiOiJrZXl3b3JkIiwidmFsdWUiOiIifSx7Im5hbWUiOiJkZWZhdWx0Rm9sZGluZ1N0YXRlIiwidmFsdWUiOiJvbiJ9LHsibmFtZSI6ImRlZmF1bHRUb2dnbGVEaXNwbGF5ZWQiLCJ2YWx1ZSI6Im9uIn1dfSwiZGVjb3JhdG9ycyI6W119","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":46,"pos":[-800,2944],"params":["Inherit","False","Property","_Hidden","Hidden","34","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:440:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiQXBwZWFyYW5jZSJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IkFwcGVhcmFuY2UifV19LCJkZWNvcmF0b3JzIjpbeyJfZHJhd2VyVHlwZU5hbWUiOiJIaWRkZW5EZWNvcmF0b3IiLCJfcGFyYW1ldGVycyI6W10sIl9pc0RlY29yYXRvciI6dHJ1ZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoiIiwiX25hbWVkUGFyYW1ldGVycyI6W119XX0=","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":47,"pos":[-816,3648],"params":["Inherit","False","Property","_PassSwitch","Pass Switch","40","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:584:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViVG9nZ2xlRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiQ29uZGl0aW9uIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiQ29uZGl0aW9uIn1dfSwiZGVjb3JhdG9ycyI6W3siX2RyYXdlclR5cGVOYW1lIjoiUGFzc1N3aXRjaERlY29yYXRvciIsIl9wYXJhbWV0ZXJzIjpbIlVuaXZlcnNhbEZvcndhcmRPbmx5Il0sIl9pc0RlY29yYXRvciI6dHJ1ZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoicGFzc25hbWUgbGlnaHRNb2RlTmFtZTEiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoibGlnaHRNb2RlTmFtZTEiLCJ2YWx1ZSI6IlVuaXZlcnNhbEZvcndhcmRPbmx5In1dfV19","1","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":44,"pos":[-816,3440],"params":["Inherit","False","Property","_ShowIfTrue1","Show If True (1)","38","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:684:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiQ29uZGl0aW9uIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiQ29uZGl0aW9uIn1dfSwiZGVjb3JhdG9ycyI6W3siX2RyYXdlclR5cGVOYW1lIjoiU2hvd0lmRGVjb3JhdG9yIiwiX3BhcmFtZXRlcnMiOlsiX1RvZ2dsZSIsIiIsIjEiXSwiX2lzRGVjb3JhdG9yIjp0cnVlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgcHJvcE5hbWVPcktleXdvcmQsZW51bSBjb21wYXJlRnVuY3Rpb24sZmxvYXQgdmFsdWUiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoicHJvcE5hbWVPcktleXdvcmQiLCJ2YWx1ZSI6Il9Ub2dnbGUifSx7Im5hbWUiOiJjb21wYXJlRnVuY3Rpb24iLCJ2YWx1ZSI6IiJ9LHsibmFtZSI6InZhbHVlIiwidmFsdWUiOiIxIn1dfV19","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":40,"pos":[-816,3152],"params":["Inherit","False","Property","_ConditionDecoratorsGroup","====== Condition Decorators Group ======","35","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:440:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiTWFpbkRyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIkNvbmRpdGlvbiIsIiIsIm9uIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCxrZXl3b3JkIGtleXdvcmQsZW51bSBkZWZhdWx0Rm9sZGluZ1N0YXRlIiwiX25hbWVkUGFyYW1ldGVycyI6W3sibmFtZSI6Imdyb3VwIiwidmFsdWUiOiJDb25kaXRpb24ifSx7Im5hbWUiOiJrZXl3b3JkIiwidmFsdWUiOiIifSx7Im5hbWUiOiJkZWZhdWx0Rm9sZGluZ1N0YXRlIiwidmFsdWUiOiJvbiJ9XX0sImRlY29yYXRvcnMiOltdfQ==","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":37,"pos":[-800,2848],"params":["Inherit","False","Property","_ReadOnly","Read Only","33","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:444:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiQXBwZWFyYW5jZSJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IkFwcGVhcmFuY2UifV19LCJkZWNvcmF0b3JzIjpbeyJfZHJhd2VyVHlwZU5hbWUiOiJSZWFkT25seURlY29yYXRvciIsIl9wYXJhbWV0ZXJzIjpbXSwiX2lzRGVjb3JhdG9yIjp0cnVlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiIiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbXX1dfQ==","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":34,"pos":[-800,2736],"params":["Inherit","False","Property","_TooltipSample","Multilingual Tooltip#Hello, world#你好, 世界!#안녕, 세계!#","32","0","Create","False","0","0","0","True","0","False","Object","-1","LWGUI:660:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiQXBwZWFyYW5jZSJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IkFwcGVhcmFuY2UifV19LCJkZWNvcmF0b3JzIjpbeyJfZHJhd2VyVHlwZU5hbWUiOiJUb29sdGlwRGVjb3JhdG9yIiwiX3BhcmFtZXRlcnMiOlsiVG9vbHRpcCAxIiwiVG9vbHRpcCAyIiwiVG9vbHRpcCAzIl0sIl9pc0RlY29yYXRvciI6dHJ1ZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoic3RyaW5nIHMxLHN0cmluZyBzMixzdHJpbmcgczMiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiczEiLCJ2YWx1ZSI6IlRvb2x0aXAgMSJ9LHsibmFtZSI6InMyIiwidmFsdWUiOiJUb29sdGlwIDIifSx7Im5hbWUiOiJzMyIsInZhbHVlIjoiVG9vbHRpcCAzIn1dfV19","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":33,"pos":[-800,2464],"params":["Inherit","False","Property","_AppearanceDecoratorsGroup","====== Appearance Decorators Group ======","29","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:824:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiTWFpbkRyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIkFwcGVhcmFuY2UiLCIiLCJvbiJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAsa2V5d29yZCBrZXl3b3JkLGVudW0gZGVmYXVsdEZvbGRpbmdTdGF0ZSIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiQXBwZWFyYW5jZSJ9LHsibmFtZSI6ImtleXdvcmQiLCJ2YWx1ZSI6IiJ9LHsibmFtZSI6ImRlZmF1bHRGb2xkaW5nU3RhdGUiLCJ2YWx1ZSI6Im9uIn1dfSwiZGVjb3JhdG9ycyI6W3siX2RyYXdlclR5cGVOYW1lIjoiSGVscFVSTERlY29yYXRvciIsIl9wYXJhbWV0ZXJzIjpbImdpdGh1Yi5jb20iLCJKYXNvbk1hMDAxMiIsIkxXR1VJIl0sIl9pc0RlY29yYXRvciI6dHJ1ZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoic3RyaW5nIHMxLHN0cmluZyBzMixzdHJpbmcgczMiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiczEiLCJ2YWx1ZSI6ImdpdGh1Yi5jb20ifSx7Im5hbWUiOiJzMiIsInZhbHVlIjoiSmFzb25NYTAwMTIifSx7Im5hbWUiOiJzMyIsInZhbHVlIjoiTFdHVUkifV19XX0=","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":36,"pos":[-800,2576],"params":["Inherit","False","Property","_Title","Title","30","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:596:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiQXBwZWFyYW5jZSJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IkFwcGVhcmFuY2UifV19LCJkZWNvcmF0b3JzIjpbeyJfZHJhd2VyVHlwZU5hbWUiOiJUaXRsZURlY29yYXRvciIsIl9wYXJhbWV0ZXJzIjpbIkFwcGVhcmFuY2UiLCJUaXRsZSJdLCJfaXNEZWNvcmF0b3IiOnRydWUsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCxzdHJpbmcgaGVhZGVyIiwiX25hbWVkUGFyYW1ldGVycyI6W3sibmFtZSI6Imdyb3VwIiwidmFsdWUiOiJBcHBlYXJhbmNlIn0seyJuYW1lIjoiaGVhZGVyIiwidmFsdWUiOiJUaXRsZSJ9XX1dfQ==","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor","id":49,"pos":[-816,4480],"params":["Inherit","True","Property","_TextureSample0","Texture Sample 0","45","0","Create","True","0","0","0","True","0","False","","-1","None","None","True","0","False","white","Auto","False","Object","-1","Auto","Texture2D","False","8","0","SAMPLER2D","","False","1","FLOAT2","0,0","False","2","FLOAT","0","False","3","FLOAT2","0,0","False","4","FLOAT2","0,0","False","5","FLOAT","1","False","6","FLOAT","0","False","7","SAMPLERSTATE","","False","6","COLOR","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4","FLOAT3","5"]} +{"type":"AmplifyShaderEditor.ColorNode, AmplifyShaderEditor","id":52,"pos":[-816,4288],"params":["Inherit","False","Property","_Color0","Color 0","44","0","Create","True","0","0","0","True","0","False","Object","-1","","0,0,0,0","0,0,0,0","True","True","0","6","COLOR","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4","FLOAT3","5"]} +{"type":"AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor","id":54,"pos":[-800,1552],"params":["Inherit","True","Property","_TexwithChannel","Tex with Channel","26","0","Create","True","0","0","0","True","0","False","LWGUI:368:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiVGV4RHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiVmVjdG9yIiwiX0NoYW5uZWwiXSwiX2lzRGVjb3JhdG9yIjpmYWxzZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoic3RyaW5nIGdyb3VwLHN0cmluZyBleHRyYVByb3BOYW1lIiwiX25hbWVkUGFyYW1ldGVycyI6W3sibmFtZSI6Imdyb3VwIiwidmFsdWUiOiJWZWN0b3IifSx7Im5hbWUiOiJleHRyYVByb3BOYW1lIiwidmFsdWUiOiJfQ2hhbm5lbCJ9XX0sImRlY29yYXRvcnMiOltdfQ==","-1","None","None","True","0","False","white","Auto","False","Object","-1","Auto","Texture2D","False","8","0","SAMPLER2D","","False","1","FLOAT2","0,0","False","2","FLOAT","0","False","3","FLOAT2","0,0","False","4","FLOAT2","0,0","False","5","FLOAT","1","False","6","FLOAT","0","False","7","SAMPLERSTATE","","False","6","COLOR","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4","FLOAT3","5"]} +{"type":"AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor","id":55,"pos":[-800,1776],"params":["Inherit","True","Property","_TexwithRange","Tex with Range","27","0","Create","True","0","0","0","True","0","False","LWGUI:360:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiVGV4RHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiVmVjdG9yIiwiX1JhbmdlIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCxzdHJpbmcgZXh0cmFQcm9wTmFtZSIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiVmVjdG9yIn0seyJuYW1lIjoiZXh0cmFQcm9wTmFtZSIsInZhbHVlIjoiX1JhbmdlIn1dfSwiZGVjb3JhdG9ycyI6W119","-1","None","None","True","0","False","white","Auto","False","Object","-1","Auto","Texture2D","False","8","0","SAMPLER2D","","False","1","FLOAT2","0,0","False","2","FLOAT","0","False","3","FLOAT2","0,0","False","4","FLOAT2","0,0","False","5","FLOAT","1","False","6","FLOAT","0","False","7","SAMPLERSTATE","","False","6","COLOR","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4","FLOAT3","5"]} +{"type":"AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor","id":56,"pos":[-800,2000],"params":["Inherit","True","Property","_TexwithFloat","Tex with Float","28","0","Create","True","0","0","0","True","0","False","LWGUI:360:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiVGV4RHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiVmVjdG9yIiwiX0Zsb2F0Il0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCxzdHJpbmcgZXh0cmFQcm9wTmFtZSIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiVmVjdG9yIn0seyJuYW1lIjoiZXh0cmFQcm9wTmFtZSIsInZhbHVlIjoiX0Zsb2F0In1dfSwiZGVjb3JhdG9ycyI6W119","-1","None","None","True","0","False","white","Auto","False","Object","-1","Auto","Texture2D","False","8","0","SAMPLER2D","","False","1","FLOAT2","0,0","False","2","FLOAT","0","False","3","FLOAT2","0,0","False","4","FLOAT2","0,0","False","5","FLOAT","1","False","6","FLOAT","0","False","7","SAMPLERSTATE","","False","6","COLOR","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4","FLOAT3","5"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":51,"pos":[-816,4032],"params":["Inherit","False","Property","_Range1","Range 1","42","0","Create","True","0","0","0","True","0","False","Object","-1","","0.5","0","0","1","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.Vector4Node, AmplifyShaderEditor","id":50,"pos":[-816,4112],"params":["Inherit","False","Property","_Vector0","Vector 0","43","0","Create","True","0","0","0","True","0","False","Object","-1","","0,0,0,0","0,0,0,0","0","5","FLOAT4","0","FLOAT","1","FLOAT","2","FLOAT","3","FLOAT","4"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":48,"pos":[-816,3952],"params":["Inherit","False","Property","_Float0","Float 0","41","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:436:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiIiwiX3BhcmFtZXRlcnMiOltdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiIiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbXX0sImRlY29yYXRvcnMiOlt7Il9kcmF3ZXJUeXBlTmFtZSI6IlRpdGxlRGVjb3JhdG9yIiwiX3BhcmFtZXRlcnMiOlsiT3V0IG9mIEdyb3VwIl0sIl9pc0RlY29yYXRvciI6dHJ1ZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoic3RyaW5nIGhlYWRlciIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJoZWFkZXIiLCJ2YWx1ZSI6Ik91dCBvZiBHcm91cCJ9XX1dfQ==","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":16,"pos":[-784,-592],"params":["Inherit","False","Property","_Float","Float","1","0","Create","False","0","0","0","True","0","False","Object","-1","LWGUI:268:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiTnVtZXJpYyJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6Ik51bWVyaWMifV19LCJkZWNvcmF0b3JzIjpbXX0=","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":57,"pos":[-784,-112],"params":["Inherit","False","Property","_BitMask","Bit Mask","8","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:272:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiQml0TWFza0RyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIk51bWVyaWMiXSwiX2lzRGVjb3JhdG9yIjpmYWxzZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoic3RyaW5nIGdyb3VwIiwiX25hbWVkUGFyYW1ldGVycyI6W3sibmFtZSI6Imdyb3VwIiwidmFsdWUiOiJOdW1lcmljIn1dfSwiZGVjb3JhdG9ycyI6W119","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":17,"pos":[-784,-512],"params":["Inherit","False","Property","_Range","Range","2","0","Create","False","0","0","0","True","0","False","Object","-1","LWGUI:268:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiTnVtZXJpYyJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6Ik51bWVyaWMifV19LCJkZWNvcmF0b3JzIjpbXX0=","0","0","0","1","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":18,"pos":[-784,-432],"params":["Inherit","False","Property","_SubPowerSlider","Sub Power Slider","3","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:344:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViUG93ZXJTbGlkZXJEcmF3ZXIiLCJfcGFyYW1ldGVycyI6WyJOdW1lcmljIiwiNSJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAsZmxvYXQgcG93ZXIiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6Ik51bWVyaWMifSx7Im5hbWUiOiJwb3dlciIsInZhbHVlIjoiNSJ9XX0sImRlY29yYXRvcnMiOltdfQ==","50","0","0","100","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":42,"pos":[-816,3248],"params":["Inherit","False","Property","_Toggle","Toggle","36","0","Create","False","0","0","0","True","0","False","Object","-1","LWGUI:280:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViVG9nZ2xlRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiQ29uZGl0aW9uIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiQ29uZGl0aW9uIn1dfSwiZGVjb3JhdG9ycyI6W119","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":43,"pos":[-816,3344],"params":["Inherit","False","Property","_ShowIfFalse0","Show If False (0)","37","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:684:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiQ29uZGl0aW9uIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiQ29uZGl0aW9uIn1dfSwiZGVjb3JhdG9ycyI6W3siX2RyYXdlclR5cGVOYW1lIjoiU2hvd0lmRGVjb3JhdG9yIiwiX3BhcmFtZXRlcnMiOlsiX1RvZ2dsZSIsIiIsIiJdLCJfaXNEZWNvcmF0b3IiOnRydWUsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBwcm9wTmFtZU9yS2V5d29yZCxlbnVtIGNvbXBhcmVGdW5jdGlvbixmbG9hdCB2YWx1ZSIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJwcm9wTmFtZU9yS2V5d29yZCIsInZhbHVlIjoiX1RvZ2dsZSJ9LHsibmFtZSI6ImNvbXBhcmVGdW5jdGlvbiIsInZhbHVlIjoiIn0seyJuYW1lIjoidmFsdWUiLCJ2YWx1ZSI6IiJ9XX1dfQ==","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":45,"pos":[-816,3552],"params":["Inherit","False","Property","_ActiveIfTrue1","Active If True (1)","39","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:720:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiQ29uZGl0aW9uIl0sIl9pc0RlY29yYXRvciI6ZmFsc2UsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6InN0cmluZyBncm91cCIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJncm91cCIsInZhbHVlIjoiQ29uZGl0aW9uIn1dfSwiZGVjb3JhdG9ycyI6W3siX2RyYXdlclR5cGVOYW1lIjoiQWN0aXZlSWZEZWNvcmF0b3IiLCJfcGFyYW1ldGVycyI6WyIiLCJfVG9nZ2xlIiwiIiwiMSJdLCJfaXNEZWNvcmF0b3IiOnRydWUsIl9jb25zdHJ1Y3RvclNpZ25hdHVyZSI6ImVudW0gbG9naWNhbE9wZXJhdG9yLHN0cmluZyBwcm9wTmFtZU9yS2V5d29yZCxlbnVtIGNvbXBhcmVGdW5jdGlvbixmbG9hdCB2YWx1ZSIsIl9uYW1lZFBhcmFtZXRlcnMiOlt7Im5hbWUiOiJwcm9wTmFtZU9yS2V5d29yZCIsInZhbHVlIjoiX1RvZ2dsZSJ9LHsibmFtZSI6ImNvbXBhcmlzb25NZXRob2QiLCJ2YWx1ZSI6IiJ9LHsibmFtZSI6InZhbHVlIiwidmFsdWUiOiIxIn1dfV19","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":35,"pos":[-800,2656],"params":["Inherit","False","Property","_HelpboxSample","Multilingual Helpbox%Hello, world!%你好, 世界!%안녕, 세계!%%","31","0","Create","False","0","0","0","True","0","False","Object","-1","LWGUI:660:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiU3ViRHJhd2VyIiwiX3BhcmFtZXRlcnMiOlsiQXBwZWFyYW5jZSJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6IkFwcGVhcmFuY2UifV19LCJkZWNvcmF0b3JzIjpbeyJfZHJhd2VyVHlwZU5hbWUiOiJIZWxwYm94RGVjb3JhdG9yIiwiX3BhcmFtZXRlcnMiOlsiSGVscGJveCAxIiwiSGVscGJveCAyIiwiSGVscGJveCAzIl0sIl9pc0RlY29yYXRvciI6dHJ1ZSwiX2NvbnN0cnVjdG9yU2lnbmF0dXJlIjoic3RyaW5nIHMxLHN0cmluZyBzMixzdHJpbmcgczMiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiczEiLCJ2YWx1ZSI6IkhlbHBib3ggMSJ9LHsibmFtZSI6InMyIiwidmFsdWUiOiJIZWxwYm94IDIifSx7Im5hbWUiOiJzMyIsInZhbHVlIjoiSGVscGJveCAzIn1dfV19","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor","id":23,"pos":[-816,-672],"params":["Inherit","False","Property","_NumericGroupToenableASEintegrationyouneedtoInstallASEv19910EnableProjectSettingsLWGUIASEIntegration","====== Numeric Group ======%To enable ASE integration, you need to:%- Install ASE v1.9.9.10+%- Enable: Project Settings > LWGUI > ASE Integration","0","0","Create","True","0","0","0","True","0","False","Object","-1","LWGUI:544:eyJkcmF3ZXIiOnsiX2RyYXdlclR5cGVOYW1lIjoiTWFpbkRyYXdlciIsIl9wYXJhbWV0ZXJzIjpbIk51bWVyaWMiLCIiLCJvbiIsIm9mZiJdLCJfaXNEZWNvcmF0b3IiOmZhbHNlLCJfY29uc3RydWN0b3JTaWduYXR1cmUiOiJzdHJpbmcgZ3JvdXAsa2V5d29yZCBrZXl3b3JkLGVudW0gZGVmYXVsdEZvbGRpbmdTdGF0ZSxlbnVtIGRlZmF1bHRUb2dnbGVEaXNwbGF5ZWQiLCJfbmFtZWRQYXJhbWV0ZXJzIjpbeyJuYW1lIjoiZ3JvdXAiLCJ2YWx1ZSI6Ik51bWVyaWMifSx7Im5hbWUiOiJrZXl3b3JkIiwidmFsdWUiOiIifSx7Im5hbWUiOiJkZWZhdWx0Rm9sZGluZ1N0YXRlIiwidmFsdWUiOiJvbiJ9LHsibmFtZSI6ImRlZmF1bHRUb2dnbGVEaXNwbGF5ZWQiLCJ2YWx1ZSI6Im9mZiJ9XX0sImRlY29yYXRvcnMiOltdfQ==","0","0","0","0","0","1","FLOAT","0"]} +{"type":"AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor","id":0,"pos":[0,16],"params":["Float","False","False","-1","3","LWGUI.LWGUI","0","19","New Amplify Shader","2992e84f91cbeb14eab234972e07ea9d","True","ExtraPrePass","0","0","ExtraPrePass","6","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","False","False","False","True","4","RenderPipeline=UniversalPipeline","RenderType=Opaque=RenderType","Queue=Geometry=Queue=0","UniversalMaterialType=Unlit","True","5","True","12","all","0","False","False","False","False","False","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","True","3","False","","True","True","0","False","","0","False","","False","True","0","False","False","0","","0","0","Standard","0","False","0"]} +{"type":"AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor","id":2,"pos":[0,0],"params":["Float","False","False","-1","3","LWGUI.LWGUI","0","19","New Amplify Shader","2992e84f91cbeb14eab234972e07ea9d","True","ShadowCaster","0","2","ShadowCaster","0","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","False","False","False","True","4","RenderPipeline=UniversalPipeline","RenderType=Opaque=RenderType","Queue=Geometry=Queue=0","UniversalMaterialType=Unlit","True","5","True","12","all","0","False","False","False","False","False","False","False","False","False","False","False","False","True","0","False","","False","False","False","True","False","False","False","False","0","False","","False","False","False","False","False","False","False","False","False","True","1","False","","True","3","False","","False","False","True","1","LightMode=ShadowCaster","False","False","0","","0","0","Standard","0","False","0"]} +{"type":"AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor","id":3,"pos":[0,0],"params":["Float","False","False","-1","3","LWGUI.LWGUI","0","19","New Amplify Shader","2992e84f91cbeb14eab234972e07ea9d","True","DepthOnly","0","3","DepthOnly","0","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","False","False","False","True","4","RenderPipeline=UniversalPipeline","RenderType=Opaque=RenderType","Queue=Geometry=Queue=0","UniversalMaterialType=Unlit","True","5","True","12","all","0","False","False","False","False","False","False","False","False","False","False","False","False","True","0","False","","False","False","False","True","True","False","False","False","0","False","","False","False","False","False","False","False","False","False","False","True","1","False","","False","False","False","True","1","LightMode=DepthOnly","False","False","0","","0","0","Standard","0","False","0"]} +{"type":"AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor","id":4,"pos":[0,0],"params":["Float","False","False","-1","3","LWGUI.LWGUI","0","19","New Amplify Shader","2992e84f91cbeb14eab234972e07ea9d","True","Meta","0","4","Meta","0","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","False","False","False","True","4","RenderPipeline=UniversalPipeline","RenderType=Opaque=RenderType","Queue=Geometry=Queue=0","UniversalMaterialType=Unlit","True","5","True","12","all","0","False","False","False","False","False","False","False","False","False","False","False","False","False","False","True","2","False","","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","True","1","LightMode=Meta","False","False","0","","0","0","Standard","0","False","0"]} +{"type":"AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor","id":5,"pos":[0,0],"params":["Float","False","False","-1","3","LWGUI.LWGUI","0","19","New Amplify Shader","2992e84f91cbeb14eab234972e07ea9d","True","Universal2D","0","5","Universal2D","0","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","False","False","False","True","4","RenderPipeline=UniversalPipeline","RenderType=Opaque=RenderType","Queue=Geometry=Queue=0","UniversalMaterialType=Unlit","True","5","True","12","all","0","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","True","3","False","","True","True","0","False","","0","False","","False","True","1","LightMode=Universal2D","False","False","0","","0","0","Standard","0","False","0"]} +{"type":"AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor","id":6,"pos":[0,0],"params":["Float","False","False","-1","3","LWGUI.LWGUI","0","19","New Amplify Shader","2992e84f91cbeb14eab234972e07ea9d","True","SceneSelectionPass","0","6","SceneSelectionPass","0","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","False","False","False","True","4","RenderPipeline=UniversalPipeline","RenderType=Opaque=RenderType","Queue=Geometry=Queue=0","UniversalMaterialType=Unlit","True","5","True","12","all","0","False","False","False","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","2","False","","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","True","1","LightMode=SceneSelectionPass","False","False","0","","0","0","Standard","0","False","0"]} +{"type":"AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor","id":7,"pos":[0,0],"params":["Float","False","False","-1","3","LWGUI.LWGUI","0","19","New Amplify Shader","2992e84f91cbeb14eab234972e07ea9d","True","ScenePickingPass","0","7","ScenePickingPass","0","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","False","False","False","True","4","RenderPipeline=UniversalPipeline","RenderType=Opaque=RenderType","Queue=Geometry=Queue=0","UniversalMaterialType=Unlit","True","5","True","12","all","0","False","False","False","False","False","False","False","False","False","False","False","False","True","0","False","","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","True","1","LightMode=Picking","False","False","0","","0","0","Standard","0","False","0"]} +{"type":"AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor","id":8,"pos":[0,0],"params":["Float","False","False","-1","3","LWGUI.LWGUI","0","19","New Amplify Shader","2992e84f91cbeb14eab234972e07ea9d","True","DepthNormals","0","8","DepthNormals","0","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","False","False","False","True","4","RenderPipeline=UniversalPipeline","RenderType=Opaque=RenderType","Queue=Geometry=Queue=0","UniversalMaterialType=Unlit","True","5","True","12","all","0","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","True","1","False","","True","3","False","","False","False","True","1","LightMode=DepthNormalsOnly","False","False","0","","0","0","Standard","0","False","0"]} +{"type":"AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor","id":9,"pos":[0,0],"params":["Float","False","False","-1","3","LWGUI.LWGUI","0","19","New Amplify Shader","2992e84f91cbeb14eab234972e07ea9d","True","DepthNormalsOnly","0","9","DepthNormalsOnly","0","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","False","False","False","True","4","RenderPipeline=UniversalPipeline","RenderType=Opaque=RenderType","Queue=Geometry=Queue=0","UniversalMaterialType=Unlit","True","5","True","12","all","0","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","False","True","1","False","","True","3","False","","False","False","True","1","LightMode=DepthNormalsOnly","False","True","9","d3d11","metal","vulkan","xboxone","xboxseries","playstation","ps4","ps5","switch","0","","0","0","Standard","0","False","0"]} +{"type":"AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor","id":1,"pos":[16,16],"params":["Float","False","True","-1","3","LWGUI.LWGUI","0","19","New Amplify Shader","2992e84f91cbeb14eab234972e07ea9d","True","Forward","0","1","Forward","11","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","False","False","False","True","4","RenderPipeline=UniversalPipeline","RenderType=Opaque=RenderType","Queue=Geometry=Queue=0","UniversalMaterialType=Unlit","True","5","True","12","all","0","False","True","1","1","False","","0","False","","1","1","False","","0","False","","True","1","False","","1","False","","False","False","False","False","False","False","False","False","False","False","False","True","0","False","","False","True","True","True","True","True","0","False","","False","False","False","False","False","False","False","True","False","0","False","","255","False","","255","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","0","False","","False","True","1","False","","True","3","False","","True","True","0","False","","0","False","","False","True","1","LightMode=UniversalForwardOnly","False","False","0","","0","0","Standard","28","Surface","0","0"," Keep Alpha","0","0"," Blend","0","0","Two Sided","1","0","Alpha Clipping","0","0"," Use Shadow Threshold","0","0","Fragment Normal Space","0","0","Forward Only","0","0","Cast Shadows","1","0","Receive Shadows","2","0","Receive SSAO","1","0","GPU Instancing","1","0","LOD CrossFade","1","0","Built-in Fog","1","0","Meta Pass","0","0","Extra Pre Pass","0","0","Tessellation","0","0"," Phong","0","0"," Strength","0.5,False,","0"," Type","0","0"," Tess","16,False,","0"," Min","10,False,","0"," Max","25,False,","0"," Edge Length","16,False,","0"," Max Displacement","25,False,","0","Write Depth","0","0"," Conservative","0","0","Vertex Position","1","0","0","10","False","True","True","True","False","False","True","True","True","False","False","","False","0"]} +{"wire":[1,2,24,0]} ASEEND*/ -//CHKSM=36FE0B7AD71692790E05DD385EEB8E972C762524 \ No newline at end of file +//CHKSM=9D96F055B4D07596512CFBB9CB7E5447D2E1CF59 \ No newline at end of file diff --git a/assets~/Pasted image 20260714225931.png b/assets~/Pasted image 20260714225931.png new file mode 100644 index 0000000..547b823 Binary files /dev/null and b/assets~/Pasted image 20260714225931.png differ diff --git a/assets~/Pasted image 20260714230034.png b/assets~/Pasted image 20260714230034.png new file mode 100644 index 0000000..49a3f50 Binary files /dev/null and b/assets~/Pasted image 20260714230034.png differ diff --git a/assets~/Pasted image 20260714231511.png b/assets~/Pasted image 20260714231511.png new file mode 100644 index 0000000..1543f54 Binary files /dev/null and b/assets~/Pasted image 20260714231511.png differ diff --git a/package.json b/package.json index 319bdb7..18df35e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.jasonma.lwgui", - "version": "1.40.1", + "version": "1.41.0", "displayName": "LWGUI", "description": "A Lightweight, Flexible, Powerful Shader GUI System for Unity.", "keywords": [