From 69240de0f614084f09fb077174be56208b56d84d Mon Sep 17 00:00:00 2001 From: Fredrik Lillemoen Eiding Date: Sun, 22 Dec 2024 05:05:47 +0100 Subject: [PATCH 1/2] Add sine wave animation for health HUD --- Assets/Materials/UI/HealthBar.mat | 132 + Assets/Materials/UI/HealthBar.mat.meta | 8 + Assets/Prefabs/Input/NetworkPlayer.prefab | 10 +- Assets/Scripts/UI/PlayerHUDController.cs | 22 +- Assets/Shaders/HealthBar.shadergraph | 2897 +++++++++++++++++++++ Assets/Shaders/HealthBar.shadergraph.meta | 10 + 6 files changed, 3076 insertions(+), 3 deletions(-) create mode 100644 Assets/Materials/UI/HealthBar.mat create mode 100644 Assets/Materials/UI/HealthBar.mat.meta create mode 100644 Assets/Shaders/HealthBar.shadergraph create mode 100644 Assets/Shaders/HealthBar.shadergraph.meta diff --git a/Assets/Materials/UI/HealthBar.mat b/Assets/Materials/UI/HealthBar.mat new file mode 100644 index 000000000..1a0e12030 --- /dev/null +++ b/Assets/Materials/UI/HealthBar.mat @@ -0,0 +1,132 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HealthBar + m_Shader: {fileID: -6465566751694194690, guid: f7ecd39441a849e4d87870dcd5428b65, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _WorkflowMode: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 1, g: 1, b: 1, a: 1} + - _Color: {r: 1, g: 1, b: 1, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] +--- !u!114 &6404493371688589894 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: + version: 7 diff --git a/Assets/Materials/UI/HealthBar.mat.meta b/Assets/Materials/UI/HealthBar.mat.meta new file mode 100644 index 000000000..5c49bb701 --- /dev/null +++ b/Assets/Materials/UI/HealthBar.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 0ae925ac9e062854c9254d87fa608379 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Prefabs/Input/NetworkPlayer.prefab b/Assets/Prefabs/Input/NetworkPlayer.prefab index 129bc395b..918c4a0b3 100644 --- a/Assets/Prefabs/Input/NetworkPlayer.prefab +++ b/Assets/Prefabs/Input/NetworkPlayer.prefab @@ -76,6 +76,14 @@ PrefabInstance: propertyPath: m_IsActive value: 0 objectReference: {fileID: 0} + - target: {fileID: 6721764986224867716, guid: 2872a05bf8e94d541a70726bb35085f3, type: 3} + propertyPath: m_RenderingLayerMask + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 8325376438412411157, guid: 2872a05bf8e94d541a70726bb35085f3, type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 0ae925ac9e062854c9254d87fa608379, type: 2} - target: {fileID: 8692423856261334150, guid: 2872a05bf8e94d541a70726bb35085f3, type: 3} propertyPath: _assetId value: 3821175277 @@ -167,13 +175,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7fa6481de280fb5489fa0e0e0d7a7026, type: 3} m_Name: m_EditorClassIdentifier: + id: 0 color: {r: 0, g: 0, b: 0, a: 0} playerName: isAI: 0 body: {fileID: 0} barrel: {fileID: 0} extension: {fileID: 0} - id: 0 --- !u!95 &3043983234383150226 stripped Animator: m_CorrespondingSourceObject: {fileID: 3755527737191155748, guid: 2872a05bf8e94d541a70726bb35085f3, type: 3} diff --git a/Assets/Scripts/UI/PlayerHUDController.cs b/Assets/Scripts/UI/PlayerHUDController.cs index d349d3c09..6177e9bf6 100644 --- a/Assets/Scripts/UI/PlayerHUDController.cs +++ b/Assets/Scripts/UI/PlayerHUDController.cs @@ -157,7 +157,7 @@ void Start() chipBox.anchoredPosition = new Vector2(originalChipX, -originalChipY); healthBarScaleX = healthBar.transform.localScale.x; - healthBar.color = healthMax; + healthBar.material.SetColor("_Color", HealthPalette(1f)); healthTextPosition = healthText.transform.localPosition; crosshair.rectTransform.sizeDelta *= SettingsDataManager.Singleton.Data.CrosshairSize; @@ -271,7 +271,7 @@ private void UpdateHealthBar(float currentHealth, float maxHealth) width = Mathf.Max(width, 0.001f); LeanTween.value(healthBar.gameObject, SetHealthBar, healthBar.transform.localScale.x, width, tweenDuration); - healthBar.color = Color.Lerp(healthMin, healthMax, (Mathf.Max(currentHealth, 0) / maxHealth)); + healthBar.material.SetColor("_Color", HealthPalette(Mathf.Max(currentHealth, 0) / maxHealth)); } private void SetHealthBar(float width) @@ -406,4 +406,22 @@ public void UpdateOnInitialize(GunStats stats) else crosshairMaterial.EnableKeyword("_MODE_" + mode.ToString().ToUpper()); } + + // Implementation based of https://iquilezles.org/articles/palettes/ + // Health is expected to be normalized. + public Color HealthPalette(float health) + { + health = Mathf.SmoothStep(0.25f, 0.68f, health); + Vector3 contrast = new Vector3(0.6f, 0.6f, 0f); + Vector3 brightness = new Vector3(0.6f, 0.3f, 0.5f); + Vector3 oscilations = new Vector3(0.9f, 0.9f, 0f); + Vector3 phase = new Vector3(0.69f, 0.35f, 0.6f); + Vector3 octave = Mathf.PI * 2f * (oscilations * health + phase); + Vector3 rgb = new Vector3(Mathf.Cos(octave.x), Mathf.Cos(octave.y), Mathf.Cos(octave.z)); + Vector3 palette = contrast + new Vector3( + brightness.x * rgb.x, + brightness.y * rgb.y, + brightness.z * rgb.z); + return new Color(palette.x, palette.y, palette.z); + } } diff --git a/Assets/Shaders/HealthBar.shadergraph b/Assets/Shaders/HealthBar.shadergraph new file mode 100644 index 000000000..fd9f73ba0 --- /dev/null +++ b/Assets/Shaders/HealthBar.shadergraph @@ -0,0 +1,2897 @@ +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.GraphData", + "m_ObjectId": "4c885f760cdb4d268b26a2bde07f9663", + "m_Properties": [ + { + "m_Id": "dfa436119f694f96b5b054f459532b09" + }, + { + "m_Id": "1f53faf21fc44b7c9c0a3a289fca9745" + } + ], + "m_Keywords": [], + "m_Dropdowns": [], + "m_CategoryData": [ + { + "m_Id": "976f516e1d064a40ab782a19f3aba105" + } + ], + "m_Nodes": [ + { + "m_Id": "0fd25f93941b47018fdb6c823334a75e" + }, + { + "m_Id": "db1de3dda60b4dbca06336401dbb9150" + }, + { + "m_Id": "601d69b7164349f99f14c1d9fb468a17" + }, + { + "m_Id": "33387888c0bf4028b797a37fb59add69" + }, + { + "m_Id": "a1be08ea0c1c4b11b30d8c2fa1e129b6" + }, + { + "m_Id": "3198ef944e754e26831bc900a0ac9815" + }, + { + "m_Id": "76c203a51e974ea09ce327696dde67c2" + }, + { + "m_Id": "493955bf656c4413a069539281087d25" + }, + { + "m_Id": "17e51e84c84e4f69af6e5d27808f1f68" + }, + { + "m_Id": "b770ea7f7844477885e4e897c1ebee0e" + }, + { + "m_Id": "c8ddb7e0c706430baaecff46775567ea" + }, + { + "m_Id": "38c044a6d7a149eb8248ce6ed91adb92" + }, + { + "m_Id": "e56d61989dc5416fbea9c639bef3296b" + }, + { + "m_Id": "e3479dd8f41c40938ad9d8066d23bc44" + }, + { + "m_Id": "bdf1253c9dda4fb8a8e15e531bf26d21" + }, + { + "m_Id": "84cf264301be4ad39ab6fcb2410ce835" + }, + { + "m_Id": "0c28aba6a0554725b437d2309796bf3f" + }, + { + "m_Id": "8ec7baac72a445eb8a129137413759f6" + }, + { + "m_Id": "315bcb3f158148e2b928755f1bffa44c" + }, + { + "m_Id": "e3eef6ffaee8477b9132592da26e13cf" + }, + { + "m_Id": "c46af436ff68473783aa4b557936bf45" + }, + { + "m_Id": "8376a1e400b0461298196a5bc920de11" + } + ], + "m_GroupDatas": [], + "m_StickyNoteDatas": [], + "m_Edges": [ + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "0c28aba6a0554725b437d2309796bf3f" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "8ec7baac72a445eb8a129137413759f6" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "315bcb3f158148e2b928755f1bffa44c" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "33387888c0bf4028b797a37fb59add69" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "315bcb3f158148e2b928755f1bffa44c" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "76c203a51e974ea09ce327696dde67c2" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "3198ef944e754e26831bc900a0ac9815" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "315bcb3f158148e2b928755f1bffa44c" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "3198ef944e754e26831bc900a0ac9815" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c46af436ff68473783aa4b557936bf45" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "38c044a6d7a149eb8248ce6ed91adb92" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e3479dd8f41c40938ad9d8066d23bc44" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "493955bf656c4413a069539281087d25" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "b770ea7f7844477885e4e897c1ebee0e" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "76c203a51e974ea09ce327696dde67c2" + }, + "m_SlotId": 4 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "a1be08ea0c1c4b11b30d8c2fa1e129b6" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "8376a1e400b0461298196a5bc920de11" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e3479dd8f41c40938ad9d8066d23bc44" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "84cf264301be4ad39ab6fcb2410ce835" + }, + "m_SlotId": 3 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "e3eef6ffaee8477b9132592da26e13cf" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "8ec7baac72a445eb8a129137413759f6" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "bdf1253c9dda4fb8a8e15e531bf26d21" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "b770ea7f7844477885e4e897c1ebee0e" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "38c044a6d7a149eb8248ce6ed91adb92" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "b770ea7f7844477885e4e897c1ebee0e" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "0c28aba6a0554725b437d2309796bf3f" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "bdf1253c9dda4fb8a8e15e531bf26d21" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "84cf264301be4ad39ab6fcb2410ce835" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c46af436ff68473783aa4b557936bf45" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "315bcb3f158148e2b928755f1bffa44c" + }, + "m_SlotId": 1 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "c8ddb7e0c706430baaecff46775567ea" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "bdf1253c9dda4fb8a8e15e531bf26d21" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e3479dd8f41c40938ad9d8066d23bc44" + }, + "m_SlotId": 2 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "c8ddb7e0c706430baaecff46775567ea" + }, + "m_SlotId": 0 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e3eef6ffaee8477b9132592da26e13cf" + }, + "m_SlotId": 1 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "315bcb3f158148e2b928755f1bffa44c" + }, + "m_SlotId": 3 + } + }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e56d61989dc5416fbea9c639bef3296b" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "8376a1e400b0461298196a5bc920de11" + }, + "m_SlotId": 1 + } + } + ], + "m_VertexContext": { + "m_Position": { + "x": 0.0, + "y": 0.0 + }, + "m_Blocks": [ + { + "m_Id": "0fd25f93941b47018fdb6c823334a75e" + }, + { + "m_Id": "db1de3dda60b4dbca06336401dbb9150" + }, + { + "m_Id": "601d69b7164349f99f14c1d9fb468a17" + } + ] + }, + "m_FragmentContext": { + "m_Position": { + "x": 0.0, + "y": 200.0 + }, + "m_Blocks": [ + { + "m_Id": "33387888c0bf4028b797a37fb59add69" + }, + { + "m_Id": "a1be08ea0c1c4b11b30d8c2fa1e129b6" + } + ] + }, + "m_PreviewData": { + "serializedMesh": { + "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "preventRotation": false + }, + "m_Path": "Shader Graphs", + "m_GraphPrecision": 1, + "m_PreviewMode": 2, + "m_OutputNode": { + "m_Id": "" + }, + "m_ActiveTargets": [ + { + "m_Id": "8d3e4502866d470aa7c5ad6bbcde7392" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "00326c52035c401483d60c69910ac292", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "003452d715a544ed999120ad4c893d7f", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "013df3d4d43b4bf0a0fea632cfe2bd2e", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 5.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "0c28aba6a0554725b437d2309796bf3f", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -998.39990234375, + "y": 444.0, + "width": 207.99993896484376, + "height": 301.59991455078127 + } + }, + "m_Slots": [ + { + "m_Id": "013df3d4d43b4bf0a0fea632cfe2bd2e" + }, + { + "m_Id": "e3d33c75701544c89c0b52f53fd8dffc" + }, + { + "m_Id": "00326c52035c401483d60c69910ac292" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "0fd25f93941b47018fdb6c823334a75e", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Position", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "feead88c23d0471f8e88bed17430fcc4" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Position" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "135f4a7ed5fe424482bda8031be454bd", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "13ff927a8b0446c69e620c5d5788bf7a", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "17e51e84c84e4f69af6e5d27808f1f68", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -879.0, + "y": -5.399993896484375, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "d7a3abe9cee949f3b25869996b0183fc" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "1f53faf21fc44b7c9c0a3a289fca9745" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty", + "m_ObjectId": "1f53faf21fc44b7c9c0a3a289fca9745", + "m_Guid": { + "m_GuidSerialized": "8bcddc20-f053-47e6-8b5e-1382353e4cfc" + }, + "m_Name": "MainTex", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "MainTex", + "m_DefaultReferenceName": "_MainTex", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "m_SerializedTexture": "{\"texture\":{\"instanceID\":0}}", + "m_Guid": "" + }, + "isMainTexture": false, + "useTilingAndOffset": false, + "m_Modifiable": true, + "m_DefaultType": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "217112649ea94a6cb71b9949e1c75290", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlendNode", + "m_ObjectId": "315bcb3f158148e2b928755f1bffa44c", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Blend", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -309.6000061035156, + "y": 460.8000183105469, + "width": 208.00001525878907, + "height": 359.2000427246094 + } + }, + "m_Slots": [ + { + "m_Id": "a8cc41ab1fcb4b56a96ccf858af2bf1c" + }, + { + "m_Id": "6cf5f1d38aa645d0b840275b9611186f" + }, + { + "m_Id": "74c7a5b7054c47a6a36d227df704f14a" + }, + { + "m_Id": "3edf27fc867c41ab9ecc0a9c899292ea" + } + ], + "synonyms": [ + "burn", + "darken", + "difference", + "dodge", + "divide", + "exclusion", + "hard light", + "hard mix", + "linear burn", + "linear dodge", + "linear light", + "multiply", + "negate", + "overlay", + "pin light", + "screen", + "soft light", + "subtract", + "vivid light", + "overwrite" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_BlendMode": 21 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "3198ef944e754e26831bc900a0ac9815", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -512.7999877929688, + "y": 427.2000427246094, + "width": 105.60000610351563, + "height": 33.5999755859375 + } + }, + "m_Slots": [ + { + "m_Id": "c15f87f94a0943778ebb116abb064def" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "dfa436119f694f96b5b054f459532b09" + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "3317f77552a1451191293c82c3eda51c", + "m_Id": 3, + "m_DisplayName": "Delta Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Delta Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "33387888c0bf4028b797a37fb59add69", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.BaseColor", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "e4b6da371b3746d1ae1cd9c7f1978649" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.BaseColor" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "38c044a6d7a149eb8248ce6ed91adb92", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1282.3997802734375, + "y": 200.0, + "width": 207.9998779296875, + "height": 301.5999450683594 + } + }, + "m_Slots": [ + { + "m_Id": "c22b7d0ea1bc42a4a9966c5eeb544cda" + }, + { + "m_Id": "a8b4d39234c04c92a010604761204897" + }, + { + "m_Id": "55c9bbfc09d443ca84e04e84c9f4e3ef" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalSpriteUnlitSubTarget", + "m_ObjectId": "3e74227d3d01489e9816b65f050a0d16" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "3edf27fc867c41ab9ecc0a9c899292ea", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "44583489e8fd40718e3005b6480faac2", + "m_Id": 0, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "467c967d0c084366a7b22ccf5b3608c0", + "m_Id": 1, + "m_DisplayName": "Min", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Min", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.UVNode", + "m_ObjectId": "493955bf656c4413a069539281087d25", + "m_Group": { + "m_Id": "" + }, + "m_Name": "UV", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1824.7999267578125, + "y": 112.0, + "width": 208.0, + "height": 311.1999816894531 + } + }, + "m_Slots": [ + { + "m_Id": "44583489e8fd40718e3005b6480faac2" + } + ], + "synonyms": [ + "texcoords", + "coords", + "coordinates" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_OutputChannel": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "51c94600b8344ed5bc3d5546f2a8e881", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "55c9bbfc09d443ca84e04e84c9f4e3ef", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "56fa3e5b1c624957b2a7d61e3a66f4f8", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "5df69c30595c478a8cd2a6d6ddea653c", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.4000000059604645, + "e01": 0.4000000059604645, + "e02": 0.4000000059604645, + "e03": 1.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TangentMaterialSlot", + "m_ObjectId": "5f352f511d6543fc86fe40174894e877", + "m_Id": 0, + "m_DisplayName": "Tangent", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Tangent", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "601d69b7164349f99f14c1d9fb468a17", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Tangent", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "5f352f511d6543fc86fe40174894e877" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Tangent" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "66d5b5f911ab40d0a32a5ca554356402", + "m_Id": 2, + "m_DisplayName": "Max", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Max", + "m_StageCapability": 3, + "m_Value": { + "x": 1.0, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "692eaeb8f3b6484b8d282a5095f03cd7", + "m_Id": 2, + "m_DisplayName": "Cosine Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Cosine Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "6cae934d2696475cb28905caa911e126", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "6cf5f1d38aa645d0b840275b9611186f", + "m_Id": 1, + "m_DisplayName": "Blend", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Blend", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "701c0761b2244c10a1d2b6a400e8224b", + "m_Id": 3, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "704928417a2b449f8cd32d2a4b8a680b", + "m_Id": 2, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "72b7d84e0e0846c6b99433f1be3ce5d6", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "74c7a5b7054c47a6a36d227df704f14a", + "m_Id": 3, + "m_DisplayName": "Opacity", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Opacity", + "m_StageCapability": 3, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SplitNode", + "m_ObjectId": "76c203a51e974ea09ce327696dde67c2", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Split", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -162.4000244140625, + "y": 251.20001220703126, + "width": 119.20001220703125, + "height": 148.79995727539063 + } + }, + "m_Slots": [ + { + "m_Id": "56fa3e5b1c624957b2a7d61e3a66f4f8" + }, + { + "m_Id": "7fb33aed6f694ddaa99d014b0cb5a2c6" + }, + { + "m_Id": "704928417a2b449f8cd32d2a4b8a680b" + }, + { + "m_Id": "701c0761b2244c10a1d2b6a400e8224b" + }, + { + "m_Id": "7fb1a9c5fe454e92a2ee06118eb32387" + } + ], + "synonyms": [ + "separate" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "7fb1a9c5fe454e92a2ee06118eb32387", + "m_Id": 4, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "7fb33aed6f694ddaa99d014b0cb5a2c6", + "m_Id": 1, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "812860014f7e40b98e71522adbbdd72d", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "8376a1e400b0461298196a5bc920de11", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1554.4000244140625, + "y": 665.5999755859375, + "width": 208.0, + "height": 301.60009765625 + } + }, + "m_Slots": [ + { + "m_Id": "efa287e111d748178a59d60c6bfc0f1b" + }, + { + "m_Id": "217112649ea94a6cb71b9949e1c75290" + }, + { + "m_Id": "f145e2cc2faf43bd8cb9f2b5ec0b6a9c" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ClampNode", + "m_ObjectId": "84cf264301be4ad39ab6fcb2410ce835", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Clamp", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -670.4000854492188, + "y": -23.200016021728517, + "width": 208.00009155273438, + "height": 325.6000061035156 + } + }, + "m_Slots": [ + { + "m_Id": "8b6f27ddfdbf4be0ba3a42d7e5576da4" + }, + { + "m_Id": "467c967d0c084366a7b22ccf5b3608c0" + }, + { + "m_Id": "66d5b5f911ab40d0a32a5ca554356402" + }, + { + "m_Id": "add74e126ea54fef99b068ac63bf289d" + } + ], + "synonyms": [ + "limit" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "8b6f27ddfdbf4be0ba3a42d7e5576da4", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalTarget", + "m_ObjectId": "8d3e4502866d470aa7c5ad6bbcde7392", + "m_Datas": [], + "m_ActiveSubTarget": { + "m_Id": "3e74227d3d01489e9816b65f050a0d16" + }, + "m_AllowMaterialOverride": false, + "m_SurfaceType": 0, + "m_ZTestMode": 4, + "m_ZWriteControl": 0, + "m_AlphaMode": 0, + "m_RenderFace": 2, + "m_AlphaClip": false, + "m_CastShadows": true, + "m_ReceiveShadows": true, + "m_SupportsLODCrossFade": false, + "m_CustomEditorGUI": "", + "m_SupportVFX": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SubtractNode", + "m_ObjectId": "8ec7baac72a445eb8a129137413759f6", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Subtract", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -735.2000122070313, + "y": 606.4000244140625, + "width": 208.0, + "height": 301.5999755859375 + } + }, + "m_Slots": [ + { + "m_Id": "13ff927a8b0446c69e620c5d5788bf7a" + }, + { + "m_Id": "ea9795fd01f743108a2a32c91f4b1115" + }, + { + "m_Id": "135f4a7ed5fe424482bda8031be454bd" + } + ], + "synonyms": [ + "subtraction", + "remove", + "minus", + "take away" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "94c646741b7d4705b200bb4ee4d583ee", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.CategoryData", + "m_ObjectId": "976f516e1d064a40ab782a19f3aba105", + "m_Name": "", + "m_ChildObjectList": [ + { + "m_Id": "dfa436119f694f96b5b054f459532b09" + }, + { + "m_Id": "1f53faf21fc44b7c9c0a3a289fca9745" + } + ] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "97d4314c86d54299b5b467f503b71a14", + "m_Id": 4, + "m_DisplayName": "Smooth Delta", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Smooth Delta", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "9d4f93ac7a52474793101d1d10cdda79", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "9d8c92a04c41483bbdad50e9f95c5953", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "a1be08ea0c1c4b11b30d8c2fa1e129b6", + "m_Group": { + "m_Id": "" + }, + "m_Name": "SurfaceDescription.Alpha", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "d9ec1bd5a7fd4ab994e3ef5de9ef9972" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "SurfaceDescription.Alpha" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a229a16c64454b6e8bd0b2ea70ca033c", + "m_Id": 0, + "m_DisplayName": "Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "a8506619458b44c8ba29fd0e2bc9b00a", + "m_Id": 1, + "m_DisplayName": "Sine Time", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Sine Time", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "a8b4d39234c04c92a010604761204897", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 10.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "a8cc41ab1fcb4b56a96ccf858af2bf1c", + "m_Id": 0, + "m_DisplayName": "Base", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Base", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "ab69c25a37824edfb48f833a61dec0e1", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "abcac30045304c19b9c2ed32f1555408", + "m_Id": 1, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "add74e126ea54fef99b068ac63bf289d", + "m_Id": 3, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SplitNode", + "m_ObjectId": "b770ea7f7844477885e4e897c1ebee0e", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Split", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1505.599853515625, + "y": 145.6000213623047, + "width": 119.2000732421875, + "height": 148.7999725341797 + } + }, + "m_Slots": [ + { + "m_Id": "d73f8aaf63e748f4b96e4fdf317cea5b" + }, + { + "m_Id": "f54db4fc04914fdfa178828ea23324e9" + }, + { + "m_Id": "f0254d4aaed8457283a63ced971758e2" + }, + { + "m_Id": "cea8141795e046ac893cb7d1167b8936" + }, + { + "m_Id": "c53b15f065e044c6822bc75368cf327e" + } + ], + "synonyms": [ + "separate" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DistanceNode", + "m_ObjectId": "bdf1253c9dda4fb8a8e15e531bf26d21", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Distance", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -750.4000244140625, + "y": 281.60003662109377, + "width": 207.99993896484376, + "height": 301.5999755859375 + } + }, + "m_Slots": [ + { + "m_Id": "9d8c92a04c41483bbdad50e9f95c5953" + }, + { + "m_Id": "6cae934d2696475cb28905caa911e126" + }, + { + "m_Id": "ab69c25a37824edfb48f833a61dec0e1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot", + "m_ObjectId": "c15f87f94a0943778ebb116abb064def", + "m_Id": 0, + "m_DisplayName": "Color", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "c22b7d0ea1bc42a4a9966c5eeb544cda", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "c46af436ff68473783aa4b557936bf45", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -315.9675598144531, + "y": -23.167510986328126, + "width": 208.00001525878907, + "height": 301.6000061035156 + } + }, + "m_Slots": [ + { + "m_Id": "5df69c30595c478a8cd2a6d6ddea653c" + }, + { + "m_Id": "fc92fae1daf24f95811a289c4715c74f" + }, + { + "m_Id": "72b7d84e0e0846c6b99433f1be3ce5d6" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "c53b15f065e044c6822bc75368cf327e", + "m_Id": 4, + "m_DisplayName": "A", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.SineNode", + "m_ObjectId": "c8ddb7e0c706430baaecff46775567ea", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Sine", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -983.199951171875, + "y": 155.19998168945313, + "width": 208.0, + "height": 277.6000061035156 + } + }, + "m_Slots": [ + { + "m_Id": "dc022935779b48a18b406b089bd4d9ca" + }, + { + "m_Id": "abcac30045304c19b9c2ed32f1555408" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.NormalMaterialSlot", + "m_ObjectId": "c9b36e87fe4747faae8f27c091f0dbb1", + "m_Id": 0, + "m_DisplayName": "Normal", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Normal", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "cea8141795e046ac893cb7d1167b8936", + "m_Id": 3, + "m_DisplayName": "B", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "d73f8aaf63e748f4b96e4fdf317cea5b", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot", + "m_ObjectId": "d7a3abe9cee949f3b25869996b0183fc", + "m_Id": 0, + "m_DisplayName": "MainTex", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_BareResource": false +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "d9ec1bd5a7fd4ab994e3ef5de9ef9972", + "m_Id": 0, + "m_DisplayName": "Alpha", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Alpha", + "m_StageCapability": 2, + "m_Value": 1.0, + "m_DefaultValue": 1.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.BlockNode", + "m_ObjectId": "db1de3dda60b4dbca06336401dbb9150", + "m_Group": { + "m_Id": "" + }, + "m_Name": "VertexDescription.Normal", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": 0.0, + "y": 0.0, + "width": 0.0, + "height": 0.0 + } + }, + "m_Slots": [ + { + "m_Id": "c9b36e87fe4747faae8f27c091f0dbb1" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_SerializedDescriptor": "VertexDescription.Normal" +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "dc022935779b48a18b406b089bd4d9ca", + "m_Id": 0, + "m_DisplayName": "In", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "In", + "m_StageCapability": 3, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 3, + "m_Type": "UnityEditor.ShaderGraph.Internal.ColorShaderProperty", + "m_ObjectId": "dfa436119f694f96b5b054f459532b09", + "m_Guid": { + "m_GuidSerialized": "f37395e8-7fa4-457e-bc95-4ebe5842cff7" + }, + "m_Name": "Color", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "Color", + "m_DefaultReferenceName": "_Color", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": { + "r": 0.0, + "g": 0.0, + "b": 0.0, + "a": 0.0 + }, + "isMainColor": false, + "m_ColorMode": 0 +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.AddNode", + "m_ObjectId": "e3479dd8f41c40938ad9d8066d23bc44", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Add", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1328.800048828125, + "y": 594.4000854492188, + "width": 208.0, + "height": 301.5999755859375 + } + }, + "m_Slots": [ + { + "m_Id": "51c94600b8344ed5bc3d5546f2a8e881" + }, + { + "m_Id": "94c646741b7d4705b200bb4ee4d583ee" + }, + { + "m_Id": "9d4f93ac7a52474793101d1d10cdda79" + } + ], + "synonyms": [ + "addition", + "sum", + "plus" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "e3d33c75701544c89c0b52f53fd8dffc", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.OneMinusNode", + "m_ObjectId": "e3eef6ffaee8477b9132592da26e13cf", + "m_Group": { + "m_Id": "" + }, + "m_Name": "One Minus", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -373.60003662109377, + "y": 152.8000030517578, + "width": 128.00003051757813, + "height": 93.60000610351563 + } + }, + "m_Slots": [ + { + "m_Id": "003452d715a544ed999120ad4c893d7f" + }, + { + "m_Id": "812860014f7e40b98e71522adbbdd72d" + } + ], + "synonyms": [ + "complement", + "invert", + "opposite" + ], + "m_Precision": 0, + "m_PreviewExpanded": false, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", + "m_ObjectId": "e4b6da371b3746d1ae1cd9c7f1978649", + "m_Id": 0, + "m_DisplayName": "Base Color", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "BaseColor", + "m_StageCapability": 2, + "m_Value": { + "x": 0.5, + "y": 0.5, + "z": 0.5 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_ColorMode": 0, + "m_DefaultColor": { + "r": 0.5, + "g": 0.5, + "b": 0.5, + "a": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.TimeNode", + "m_ObjectId": "e56d61989dc5416fbea9c639bef3296b", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Time", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1678.4000244140625, + "y": 606.4000244140625, + "width": 124.0, + "height": 172.79998779296876 + } + }, + "m_Slots": [ + { + "m_Id": "a229a16c64454b6e8bd0b2ea70ca033c" + }, + { + "m_Id": "a8506619458b44c8ba29fd0e2bc9b00a" + }, + { + "m_Id": "692eaeb8f3b6484b8d282a5095f03cd7" + }, + { + "m_Id": "3317f77552a1451191293c82c3eda51c" + }, + { + "m_Id": "97d4314c86d54299b5b467f503b71a14" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", + "m_ObjectId": "ea9795fd01f743108a2a32c91f4b1115", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "x": 2.5, + "y": 1.0, + "z": 1.0, + "w": 1.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0, + "w": 0.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "efa287e111d748178a59d60c6bfc0f1b", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f0254d4aaed8457283a63ced971758e2", + "m_Id": 2, + "m_DisplayName": "G", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "G", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "f145e2cc2faf43bd8cb9f2b5ec0b6a9c", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "f54db4fc04914fdfa178828ea23324e9", + "m_Id": 1, + "m_DisplayName": "R", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "R", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "fc92fae1daf24f95811a289c4715c74f", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 2.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot", + "m_ObjectId": "feead88c23d0471f8e88bed17430fcc4", + "m_Id": 0, + "m_DisplayName": "Position", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "Position", + "m_StageCapability": 1, + "m_Value": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_DefaultValue": { + "x": 0.0, + "y": 0.0, + "z": 0.0 + }, + "m_Labels": [], + "m_Space": 0 +} + diff --git a/Assets/Shaders/HealthBar.shadergraph.meta b/Assets/Shaders/HealthBar.shadergraph.meta new file mode 100644 index 000000000..73049a9dd --- /dev/null +++ b/Assets/Shaders/HealthBar.shadergraph.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f7ecd39441a849e4d87870dcd5428b65 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} From 21be792b6a53069fcc585fbe63595c48b8953a92 Mon Sep 17 00:00:00 2001 From: Fredrik Lillemoen Eiding Date: Thu, 26 Dec 2024 14:02:53 +0100 Subject: [PATCH 2/2] Add colorpalette to damage popups, add damage popups to HUD --- Assets/Prefabs/Input/Player.prefab | 23 +- Assets/Prefabs/UI/DamagePopupHUD.prefab | 220 +++++++++ Assets/Prefabs/UI/DamagePopupHUD.prefab.meta | 7 + Assets/Scripts/Gamestate/PlayerManager.cs | 2 +- Assets/Scripts/Interactables/DamagePopup.cs | 58 +-- .../Interactables/DamagePopupEmitter.cs | 36 +- Assets/Scripts/UI/PlayerHUDController.cs | 32 +- Assets/Scripts/Utils/ColorPallete.cs | 24 + Assets/Scripts/Utils/ColorPallete.cs.meta | 11 + Assets/Shaders/HealthBar.shadergraph | 464 +++++++++++------- 10 files changed, 631 insertions(+), 246 deletions(-) create mode 100644 Assets/Prefabs/UI/DamagePopupHUD.prefab create mode 100644 Assets/Prefabs/UI/DamagePopupHUD.prefab.meta create mode 100644 Assets/Scripts/Utils/ColorPallete.cs create mode 100644 Assets/Scripts/Utils/ColorPallete.cs.meta diff --git a/Assets/Prefabs/Input/Player.prefab b/Assets/Prefabs/Input/Player.prefab index f0964c393..5f7a685b7 100644 --- a/Assets/Prefabs/Input/Player.prefab +++ b/Assets/Prefabs/Input/Player.prefab @@ -414,6 +414,8 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: damagePopup: {fileID: 3456343568974069144, guid: 216963e07a2087cc99a5e9c4e6b0454e, type: 3} + healthController: {fileID: 0} + isOwnerOnly: 0 --- !u!114 &8692423856261334150 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1552,6 +1554,7 @@ GameObject: - component: {fileID: 8513528357214213258} - component: {fileID: 1876285937171696916} - component: {fileID: 2367956686065937511} + - component: {fileID: 8639708736638023490} m_Layer: 5 m_Name: HealthHud m_TagString: Untagged @@ -1641,6 +1644,21 @@ SpriteRenderer: m_WasSpriteAssigned: 1 m_MaskInteraction: 0 m_SpriteSortPoint: 0 +--- !u!114 &8639708736638023490 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3099507315220960622} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 8df77ee5e94e96a21a1c251683e0d3a7, type: 3} + m_Name: + m_EditorClassIdentifier: + damagePopup: {fileID: 3456343568974069144, guid: 5c078cb9f2f563048a6541bfcea977b9, type: 3} + healthController: {fileID: 6717855691676836013} + isOwnerOnly: 1 --- !u!1 &3124495339848130259 GameObject: m_ObjectHideFlags: 0 @@ -1723,6 +1741,7 @@ MonoBehaviour: spectatorTargetText: {fileID: 5857550089673397807} damageBorderFlashDuration: 0.2 popupSpammer: {fileID: 6535424167945181997} + damagePopupEmitter: {fileID: 0} speedLines: {fileID: 1712702864845135441} speedLineEase: serializedVersion: 2 @@ -3431,10 +3450,10 @@ SpriteRenderer: m_ReflectionProbeUsage: 1 m_RayTracingMode: 0 m_RayTraceProcedural: 0 - m_RenderingLayerMask: 1 + m_RenderingLayerMask: 4 m_RendererPriority: 0 m_Materials: - - {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 2100000, guid: 0ae925ac9e062854c9254d87fa608379, type: 2} m_StaticBatchInfo: firstSubMesh: 0 subMeshCount: 0 diff --git a/Assets/Prefabs/UI/DamagePopupHUD.prefab b/Assets/Prefabs/UI/DamagePopupHUD.prefab new file mode 100644 index 000000000..bec1fb364 --- /dev/null +++ b/Assets/Prefabs/UI/DamagePopupHUD.prefab @@ -0,0 +1,220 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2974520026730963027 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3748194351601288369} + - component: {fileID: 2158285029245345615} + - component: {fileID: 3456343568974069144} + m_Layer: 5 + m_Name: DamagePopupHUD + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3748194351601288369 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2974520026730963027} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.065, y: 0.065, z: 0.065} + m_ConstrainProportionsScale: 1 + m_Children: + - {fileID: 1314711177337031033} + m_Father: {fileID: 0} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0.5} + m_SizeDelta: {x: 100, y: 10} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!223 &2158285029245345615 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2974520026730963027} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 25 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 1056283955 + m_SortingOrder: 0 + m_TargetDisplay: 0 +--- !u!114 &3456343568974069144 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2974520026730963027} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 668d5ec3f37469ffba85b5699368e1e3, type: 3} + m_Name: + m_EditorClassIdentifier: + label: {fileID: 3771122092874266332} + scaleMultiplier: 2 + lowDamage: 10 + highDamage: 70 + normalLowColor: {r: 1, g: 1, b: 1, a: 1} + normalHighColor: {r: 0.94509804, g: 0.9032764, b: 0.45098042, a: 1} + criticalLowColor: {r: 0.6344173, g: 0.9716981, b: 0.55460125, a: 1} + criticalHighColor: {r: 0.22903016, g: 0.8301887, b: 0.08223567, a: 1} + isHUD: 1 +--- !u!1 &7123424410564671507 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1314711177337031033} + - component: {fileID: 6385217241309795779} + - component: {fileID: 3771122092874266332} + m_Layer: 5 + m_Name: Damage + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1314711177337031033 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7123424410564671507} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 3748194351601288369} + m_RootOrder: -1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 5} + m_SizeDelta: {x: 100, y: 10} + m_Pivot: {x: 0.5, y: 1} +--- !u!222 &6385217241309795779 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7123424410564671507} + m_CullTransparentMesh: 1 +--- !u!114 &3771122092874266332 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7123424410564671507} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_text: 20 + m_isRightToLeft: 0 + m_fontAsset: {fileID: 11400000, guid: 72b62df8bbd2d494eb26e2df684260be, type: 2} + m_sharedMaterial: {fileID: -1782873873408761557, guid: 72b62df8bbd2d494eb26e2df684260be, type: 2} + m_fontSharedMaterials: [] + m_fontMaterial: {fileID: 0} + m_fontMaterials: [] + m_fontColor32: + serializedVersion: 2 + rgba: 4294967295 + m_fontColor: {r: 1, g: 1, b: 1, a: 1} + m_enableVertexGradient: 0 + m_colorMode: 3 + m_fontColorGradient: + topLeft: {r: 1, g: 1, b: 1, a: 1} + topRight: {r: 1, g: 1, b: 1, a: 1} + bottomLeft: {r: 1, g: 1, b: 1, a: 1} + bottomRight: {r: 1, g: 1, b: 1, a: 1} + m_fontColorGradientPreset: {fileID: 0} + m_spriteAsset: {fileID: 0} + m_tintAllSprites: 0 + m_StyleSheet: {fileID: 0} + m_TextStyleHashCode: -1183493901 + m_overrideHtmlColors: 0 + m_faceColor: + serializedVersion: 2 + rgba: 4294967295 + m_fontSize: 12 + m_fontSizeBase: 12 + m_fontWeight: 400 + m_enableAutoSizing: 0 + m_fontSizeMin: 18 + m_fontSizeMax: 72 + m_fontStyle: 1 + m_HorizontalAlignment: 2 + m_VerticalAlignment: 4096 + m_textAlignment: 65535 + m_characterSpacing: 0 + m_wordSpacing: 0 + m_lineSpacing: 0 + m_lineSpacingMax: 0 + m_paragraphSpacing: 0 + m_charWidthMaxAdj: 0 + m_enableWordWrapping: 1 + m_wordWrappingRatios: 0.4 + m_overflowMode: 0 + m_linkedTextComponent: {fileID: 0} + parentLinkedComponent: {fileID: 0} + m_enableKerning: 1 + m_enableExtraPadding: 0 + checkPaddingRequired: 0 + m_isRichText: 1 + m_parseCtrlCharacters: 1 + m_isOrthographic: 1 + m_isCullingEnabled: 0 + m_horizontalMapping: 0 + m_verticalMapping: 0 + m_uvLineOffset: 0 + m_geometrySortingOrder: 0 + m_IsTextObjectScaleStatic: 0 + m_VertexBufferAutoSizeReduction: 0 + m_useMaxVisibleDescender: 1 + m_pageToDisplay: 1 + m_margin: {x: 0, y: 0, z: 0, w: 0} + m_isUsingLegacyAnimationComponent: 0 + m_isVolumetricText: 0 + m_hasFontAssetChanged: 0 + m_baseMaterial: {fileID: 0} + m_maskOffset: {x: 0, y: 0, z: 0, w: 0} diff --git a/Assets/Prefabs/UI/DamagePopupHUD.prefab.meta b/Assets/Prefabs/UI/DamagePopupHUD.prefab.meta new file mode 100644 index 000000000..9c85113ec --- /dev/null +++ b/Assets/Prefabs/UI/DamagePopupHUD.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5c078cb9f2f563048a6541bfcea977b9 +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Gamestate/PlayerManager.cs b/Assets/Scripts/Gamestate/PlayerManager.cs index ec567fe31..9cdf55529 100644 --- a/Assets/Scripts/Gamestate/PlayerManager.cs +++ b/Assets/Scripts/Gamestate/PlayerManager.cs @@ -178,7 +178,7 @@ private void UpdateAimAngleRpc(float yAngle) private void OnDamageTaken(HealthController healthController, float damage, DamageInfo info) { if (hudController) - hudController.OnDamageTaken(healthController.CurrentHealth, healthController.MaxHealth); + hudController.OnDamageTaken(healthController.CurrentHealth, healthController.MaxHealth, damage); if (info.damageType == DamageType.Explosion) ScreenShake(info.damage * 0.005f); diff --git a/Assets/Scripts/Interactables/DamagePopup.cs b/Assets/Scripts/Interactables/DamagePopup.cs index 8e8be7d12..83a14d1d3 100644 --- a/Assets/Scripts/Interactables/DamagePopup.cs +++ b/Assets/Scripts/Interactables/DamagePopup.cs @@ -7,34 +7,27 @@ public class DamagePopup : MonoBehaviour private TMP_Text label; [SerializeField] - private float lowDamage = 20; + private float scaleMultiplier = 2f; [SerializeField] - private float highDamage = 80; - - [SerializeField] - private Color normalLowColor; - - [SerializeField] - private Color normalHighColor; - - [SerializeField] - private Color criticalLowColor; - - [SerializeField] - private Color criticalHighColor; + private bool isHUD = false; public Transform Camera { get; set; } + private float lastDamage; + public float Damage { set { - label.text = Mathf.RoundToInt(value).ToString(); + label.text = isHUD + ? $"-{Mathf.RoundToInt(value)}%" + : Mathf.RoundToInt(value).ToString(); + lastDamage = value; } get { - return int.Parse(label.text); + return lastDamage; } } @@ -42,23 +35,30 @@ public float Damage private void Start() { - label.color = DetermineColor(); + if (IsCritical && !isHUD) + LeanTween.sequence() + .append(LeanTween.value(gameObject, (Color value) => label.color = value, ColorPallete.Health(1), ColorPallete.Health(0.2f), 0.5f).setEasePunch()) + .append(LeanTween.value(gameObject, (float value) => label.color = ColorPallete.Health(value), 1, 0, 1f).setEaseInOutExpo()); + else + LeanTween.value(gameObject, (Color value) => label.color = value, Color.white, ColorPallete.Health(0.2f), 1f).setEasePunch(); var scale = transform.lossyScale; - LeanTween.sequence() - .append(LeanTween.moveY(gameObject, transform.position.y + 1f, .2f).setEaseInOutExpo()) - .append(LeanTween.scale(gameObject, scale * 2f, .4f).setEasePunch()) - .insert(LeanTween.moveY(gameObject, transform.position.y + 2f, 1).setEaseInOutExpo()) - .append(LeanTween.scale(gameObject, Vector3.zero, .2f).setEaseOutQuad() - .setOnComplete(() => Destroy(gameObject))); + if (isHUD) + LeanTween.sequence() + .append(LeanTween.moveLocalY(gameObject, transform.localPosition.y + 1, .2f).setEaseInOutExpo()) + .append(LeanTween.scale(gameObject, scale * scaleMultiplier, .4f).setEasePunch()) + .insert(LeanTween.moveLocalY(gameObject, transform.localPosition.y + 2, 1).setEaseInOutExpo()) + .append(LeanTween.scale(gameObject, Vector3.zero, .2f).setEaseOutQuad() + .setOnComplete(() => Destroy(gameObject))); + else + LeanTween.sequence() + .append(LeanTween.moveY(gameObject, transform.position.y + 1f, .2f).setEaseInOutExpo()) + .append(LeanTween.scale(gameObject, scale * scaleMultiplier, .4f).setEasePunch()) + .insert(LeanTween.moveY(gameObject, transform.position.y + 2f, 1).setEaseInOutExpo()) + .append(LeanTween.scale(gameObject, Vector3.zero, .2f).setEaseOutQuad() + .setOnComplete(() => Destroy(gameObject))); } - private Color DetermineColor() => - IsCritical - ? Color.Lerp(criticalLowColor, criticalHighColor, (Damage - lowDamage) / highDamage) - : Color.Lerp(normalLowColor, normalHighColor, (Damage - lowDamage) / highDamage); - - private void Update() { if (Camera) diff --git a/Assets/Scripts/Interactables/DamagePopupEmitter.cs b/Assets/Scripts/Interactables/DamagePopupEmitter.cs index 44bde0960..0c61ef295 100644 --- a/Assets/Scripts/Interactables/DamagePopupEmitter.cs +++ b/Assets/Scripts/Interactables/DamagePopupEmitter.cs @@ -4,18 +4,22 @@ public class DamagePopupEmitter : MonoBehaviour { [SerializeField] private DamagePopup damagePopup; - + [SerializeField] private HealthController healthController; + [SerializeField] + private bool isOwnerOnly = false; private void Start() { - healthController = GetComponent(); + if (healthController == null) + healthController = GetComponent(); healthController.onDamageTaken += OnHit; } - private void Destroy() + private void OnDestroy() { - healthController.onDamageTaken -= OnHit; + if (healthController) + healthController.onDamageTaken -= OnHit; } private void OnHit(HealthController healthController, float damage, DamageInfo info) @@ -24,15 +28,25 @@ private void OnHit(HealthController healthController, float damage, DamageInfo i return; var horizontalAxis = Vector3.Cross(info.force.normalized, Vector3.up); var position = info.position + Vector3.up * Random.Range(.5f, .8f) + horizontalAxis * Random.Range(-.2f, .2f); - var popup = Instantiate(damagePopup, position, Quaternion.identity); + DamagePopup popup; + + if (isOwnerOnly && healthController.Player.inputManager) + { + popup = Instantiate(damagePopup, transform); + popup.gameObject.layer = LayerMask.NameToLayer("Gun " + healthController.Player.inputManager.playerInput.playerIndex); + } + else + { + popup = Instantiate(damagePopup, position, Quaternion.identity); - // Real players can only see their own damage numbers, all players can see AI damage numbers - // A player victim by AI damage cannot see damage done to them by AI popup (would obscure vision) - bool isPlayer = info.sourcePlayer && info.sourcePlayer.inputManager; - popup.gameObject.layer = isPlayer ? - LayerMask.NameToLayer("Gun " + info.sourcePlayer.inputManager.playerInput.playerIndex) : gameObject.layer; + // Real players can only see their own damage numbers, all players can see AI damage numbers + // A player victim by AI damage cannot see damage done to them by AI popup (would obscure vision) + bool isPlayer = info.sourcePlayer && info.sourcePlayer.inputManager; + popup.gameObject.layer = isPlayer ? + LayerMask.NameToLayer("Gun " + info.sourcePlayer.inputManager.playerInput.playerIndex) : gameObject.layer; + popup.Camera = info.sourcePlayer.GunHolder.transform; + } - popup.Camera = info.sourcePlayer.GunHolder.transform; popup.Damage = damage; popup.IsCritical = info.isCritical; } diff --git a/Assets/Scripts/UI/PlayerHUDController.cs b/Assets/Scripts/UI/PlayerHUDController.cs index 6177e9bf6..f7b0d2d24 100644 --- a/Assets/Scripts/UI/PlayerHUDController.cs +++ b/Assets/Scripts/UI/PlayerHUDController.cs @@ -157,7 +157,7 @@ void Start() chipBox.anchoredPosition = new Vector2(originalChipX, -originalChipY); healthBarScaleX = healthBar.transform.localScale.x; - healthBar.material.SetColor("_Color", HealthPalette(1f)); + healthBar.material.SetColor("_Color", ColorPallete.Health(1f)); healthTextPosition = healthText.transform.localPosition; crosshair.rectTransform.sizeDelta *= SettingsDataManager.Singleton.Data.CrosshairSize; @@ -206,7 +206,7 @@ public void AnimateHudJump() .id; } - public void OnDamageTaken(float currentHealth, float maxHealth) + public void OnDamageTaken(float currentHealth, float maxHealth, float damage) { UpdateHealthBar(currentHealth, maxHealth); LeanTween.value(gameObject, UpdateDamageBorder, 0f, 1f, damageBorderFlashDuration); @@ -270,8 +270,9 @@ private void UpdateHealthBar(float currentHealth, float maxHealth) if (width > 0) width = Mathf.Max(width, 0.001f); - LeanTween.value(healthBar.gameObject, SetHealthBar, healthBar.transform.localScale.x, width, tweenDuration); - healthBar.material.SetColor("_Color", HealthPalette(Mathf.Max(currentHealth, 0) / maxHealth)); + LeanTween.value(healthBar.gameObject, SetHealthBar, healthBar.transform.localScale.x, width, tweenDuration).setEaseInOutExpo(); + healthBar.material.SetColor("_Color", ColorPallete.Health(Mathf.Max(currentHealth, 0) / maxHealth)); + LeanTween.value(healthBar.gameObject, SetHealthBarSine, 3f, 3f, 0.5f).setEasePunch(); } private void SetHealthBar(float width) @@ -279,6 +280,11 @@ private void SetHealthBar(float width) healthBar.transform.localScale = new Vector3(width, healthBar.transform.localScale.y, healthBar.transform.localScale.z); } + private void SetHealthBarSine(float value) + { + healthBar.material.SetFloat("_SineSpeed", value); + } + public void TweenScope(float alpha, float seconds) { if (LeanTween.isTweening(scopeTween)) @@ -406,22 +412,4 @@ public void UpdateOnInitialize(GunStats stats) else crosshairMaterial.EnableKeyword("_MODE_" + mode.ToString().ToUpper()); } - - // Implementation based of https://iquilezles.org/articles/palettes/ - // Health is expected to be normalized. - public Color HealthPalette(float health) - { - health = Mathf.SmoothStep(0.25f, 0.68f, health); - Vector3 contrast = new Vector3(0.6f, 0.6f, 0f); - Vector3 brightness = new Vector3(0.6f, 0.3f, 0.5f); - Vector3 oscilations = new Vector3(0.9f, 0.9f, 0f); - Vector3 phase = new Vector3(0.69f, 0.35f, 0.6f); - Vector3 octave = Mathf.PI * 2f * (oscilations * health + phase); - Vector3 rgb = new Vector3(Mathf.Cos(octave.x), Mathf.Cos(octave.y), Mathf.Cos(octave.z)); - Vector3 palette = contrast + new Vector3( - brightness.x * rgb.x, - brightness.y * rgb.y, - brightness.z * rgb.z); - return new Color(palette.x, palette.y, palette.z); - } } diff --git a/Assets/Scripts/Utils/ColorPallete.cs b/Assets/Scripts/Utils/ColorPallete.cs new file mode 100644 index 000000000..87ef2cf20 --- /dev/null +++ b/Assets/Scripts/Utils/ColorPallete.cs @@ -0,0 +1,24 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class ColorPallete +{ + // Implementation based of https://iquilezles.org/articles/palettes/ + // Health is expected to be normalized. + public static Color Health(float health) + { + health = Mathf.SmoothStep(0.25f, 0.68f, health); + Vector3 contrast = new Vector3(0.6f, 0.6f, 0f); + Vector3 brightness = new Vector3(0.6f, 0.3f, 0.5f); + Vector3 oscillations = new Vector3(0.9f, 0.9f, 0f); + Vector3 phase = new Vector3(0.69f, 0.35f, 0.6f); + Vector3 octave = Mathf.PI * 2f * (oscillations * health + phase); + Vector3 rgb = new Vector3(Mathf.Cos(octave.x), Mathf.Cos(octave.y), Mathf.Cos(octave.z)); + Vector3 palette = contrast + new Vector3( + brightness.x * rgb.x, + brightness.y * rgb.y, + brightness.z * rgb.z); + return new Color(palette.x, palette.y, palette.z); + } +} diff --git a/Assets/Scripts/Utils/ColorPallete.cs.meta b/Assets/Scripts/Utils/ColorPallete.cs.meta new file mode 100644 index 000000000..64235bb13 --- /dev/null +++ b/Assets/Scripts/Utils/ColorPallete.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: dadb9bc533df2c5478b259769487dcea +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Shaders/HealthBar.shadergraph b/Assets/Shaders/HealthBar.shadergraph index fd9f73ba0..fd20fb2bb 100644 --- a/Assets/Shaders/HealthBar.shadergraph +++ b/Assets/Shaders/HealthBar.shadergraph @@ -8,6 +8,9 @@ }, { "m_Id": "1f53faf21fc44b7c9c0a3a289fca9745" + }, + { + "m_Id": "bd7dd6ceff3c405e8e4350f1a31abbb4" } ], "m_Keywords": [], @@ -82,7 +85,10 @@ "m_Id": "c46af436ff68473783aa4b557936bf45" }, { - "m_Id": "8376a1e400b0461298196a5bc920de11" + "m_Id": "e4319ca600774fa1903bba83a80e3cbe" + }, + { + "m_Id": "b767f1a5ffbb48868ea32897fd4b342a" } ], "m_GroupDatas": [], @@ -203,41 +209,41 @@ { "m_OutputSlot": { "m_Node": { - "m_Id": "8376a1e400b0461298196a5bc920de11" + "m_Id": "84cf264301be4ad39ab6fcb2410ce835" }, - "m_SlotId": 2 + "m_SlotId": 3 }, "m_InputSlot": { "m_Node": { - "m_Id": "e3479dd8f41c40938ad9d8066d23bc44" + "m_Id": "e3eef6ffaee8477b9132592da26e13cf" }, - "m_SlotId": 1 + "m_SlotId": 0 } }, { "m_OutputSlot": { "m_Node": { - "m_Id": "84cf264301be4ad39ab6fcb2410ce835" + "m_Id": "8ec7baac72a445eb8a129137413759f6" }, - "m_SlotId": 3 + "m_SlotId": 2 }, "m_InputSlot": { "m_Node": { - "m_Id": "e3eef6ffaee8477b9132592da26e13cf" + "m_Id": "bdf1253c9dda4fb8a8e15e531bf26d21" }, - "m_SlotId": 0 + "m_SlotId": 1 } }, { "m_OutputSlot": { "m_Node": { - "m_Id": "8ec7baac72a445eb8a129137413759f6" + "m_Id": "b767f1a5ffbb48868ea32897fd4b342a" }, "m_SlotId": 2 }, "m_InputSlot": { "m_Node": { - "m_Id": "bdf1253c9dda4fb8a8e15e531bf26d21" + "m_Id": "e3479dd8f41c40938ad9d8066d23bc44" }, "m_SlotId": 1 } @@ -340,6 +346,20 @@ "m_SlotId": 3 } }, + { + "m_OutputSlot": { + "m_Node": { + "m_Id": "e4319ca600774fa1903bba83a80e3cbe" + }, + "m_SlotId": 0 + }, + "m_InputSlot": { + "m_Node": { + "m_Id": "b767f1a5ffbb48868ea32897fd4b342a" + }, + "m_SlotId": 0 + } + }, { "m_OutputSlot": { "m_Node": { @@ -349,7 +369,7 @@ }, "m_InputSlot": { "m_Node": { - "m_Id": "8376a1e400b0461298196a5bc920de11" + "m_Id": "b767f1a5ffbb48868ea32897fd4b342a" }, "m_SlotId": 1 } @@ -603,6 +623,54 @@ "m_SerializedDescriptor": "VertexDescription.Position" } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "11f3f1ad392f4c8da6b0c6db0d4a7824", + "m_Id": 1, + "m_DisplayName": "B", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "B", + "m_StageCapability": 3, + "m_Value": { + "e00": 3.0, + "e01": 2.0, + "e02": 2.0, + "e03": 2.0, + "e10": 2.0, + "e11": 2.0, + "e12": 2.0, + "e13": 2.0, + "e20": 2.0, + "e21": 2.0, + "e22": 2.0, + "e23": 2.0, + "e30": 2.0, + "e31": 2.0, + "e32": 2.0, + "e33": 2.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", @@ -720,30 +788,30 @@ { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "217112649ea94a6cb71b9949e1c75290", - "m_Id": 1, - "m_DisplayName": "B", - "m_SlotType": 0, + "m_ObjectId": "266c057c8ca04316b95e0686283e55dc", + "m_Id": 2, + "m_DisplayName": "Out", + "m_SlotType": 1, "m_Hidden": false, - "m_ShaderOutputName": "B", + "m_ShaderOutputName": "Out", "m_StageCapability": 3, "m_Value": { - "e00": 2.0, - "e01": 2.0, - "e02": 2.0, - "e03": 2.0, - "e10": 2.0, - "e11": 2.0, - "e12": 2.0, - "e13": 2.0, - "e20": 2.0, - "e21": 2.0, - "e22": 2.0, - "e23": 2.0, - "e30": 2.0, - "e31": 2.0, - "e32": 2.0, - "e33": 2.0 + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 }, "m_DefaultValue": { "e00": 1.0, @@ -1074,6 +1142,54 @@ "m_OutputChannel": 0 } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", + "m_ObjectId": "49ee49e57f7d483bb0d58c81df3c4d8d", + "m_Id": 0, + "m_DisplayName": "A", + "m_SlotType": 0, + "m_Hidden": false, + "m_ShaderOutputName": "A", + "m_StageCapability": 3, + "m_Value": { + "e00": 0.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 0.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 0.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 0.0 + }, + "m_DefaultValue": { + "e00": 1.0, + "e01": 0.0, + "e02": 0.0, + "e03": 0.0, + "e10": 0.0, + "e11": 1.0, + "e12": 0.0, + "e13": 0.0, + "e20": 0.0, + "e21": 0.0, + "e22": 1.0, + "e23": 0.0, + "e30": 0.0, + "e31": 0.0, + "e32": 0.0, + "e33": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", @@ -1181,9 +1297,9 @@ "m_ShaderOutputName": "A", "m_StageCapability": 3, "m_Value": { - "e00": 0.4000000059604645, - "e01": 0.4000000059604645, - "e02": 0.4000000059604645, + "e00": 0.30000001192092898, + "e01": 0.30000001192092898, + "e02": 0.30000001192092898, "e03": 1.0, "e10": 0.0, "e11": 0.0, @@ -1557,49 +1673,6 @@ } } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", - "m_ObjectId": "8376a1e400b0461298196a5bc920de11", - "m_Group": { - "m_Id": "" - }, - "m_Name": "Multiply", - "m_DrawState": { - "m_Expanded": true, - "m_Position": { - "serializedVersion": "2", - "x": -1554.4000244140625, - "y": 665.5999755859375, - "width": 208.0, - "height": 301.60009765625 - } - }, - "m_Slots": [ - { - "m_Id": "efa287e111d748178a59d60c6bfc0f1b" - }, - { - "m_Id": "217112649ea94a6cb71b9949e1c75290" - }, - { - "m_Id": "f145e2cc2faf43bd8cb9f2b5ec0b6a9c" - } - ], - "synonyms": [ - "multiplication", - "times", - "x" - ], - "m_Precision": 0, - "m_PreviewExpanded": true, - "m_DismissedVersion": 0, - "m_PreviewMode": 0, - "m_CustomColors": { - "m_SerializableColors": [] - } -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.ClampNode", @@ -1734,6 +1807,21 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", + "m_ObjectId": "92cb2b89b42042b1b41eeb8c4b5160e2", + "m_Id": 0, + "m_DisplayName": "SineSpeed", + "m_SlotType": 1, + "m_Hidden": false, + "m_ShaderOutputName": "Out", + "m_StageCapability": 3, + "m_Value": 0.0, + "m_DefaultValue": 0.0, + "m_Labels": [] +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot", @@ -1769,6 +1857,9 @@ }, { "m_Id": "1f53faf21fc44b7c9c0a3a289fca9745" + }, + { + "m_Id": "bd7dd6ceff3c405e8e4350f1a31abbb4" } ] } @@ -2035,6 +2126,49 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.MultiplyNode", + "m_ObjectId": "b767f1a5ffbb48868ea32897fd4b342a", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Multiply", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1571.199951171875, + "y": 702.4000244140625, + "width": 208.0, + "height": 301.5999755859375 + } + }, + "m_Slots": [ + { + "m_Id": "49ee49e57f7d483bb0d58c81df3c4d8d" + }, + { + "m_Id": "11f3f1ad392f4c8da6b0c6db0d4a7824" + }, + { + "m_Id": "266c057c8ca04316b95e0686283e55dc" + } + ], + "synonyms": [ + "multiplication", + "times", + "x" + ], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.SplitNode", @@ -2082,6 +2216,34 @@ } } +{ + "m_SGVersion": 1, + "m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty", + "m_ObjectId": "bd7dd6ceff3c405e8e4350f1a31abbb4", + "m_Guid": { + "m_GuidSerialized": "9098335d-38d0-46fe-b6d1-eb857970823d" + }, + "m_Name": "SineSpeed", + "m_DefaultRefNameVersion": 1, + "m_RefNameGeneratedByDisplayName": "SineSpeed", + "m_DefaultReferenceName": "_SineSpeed", + "m_OverrideReferenceName": "", + "m_GeneratePropertyBlock": true, + "m_UseCustomSlotLabel": false, + "m_CustomSlotLabel": "", + "m_DismissedVersion": 0, + "m_Precision": 0, + "overrideHLSLDeclaration": false, + "hlslDeclarationOverride": 0, + "m_Hidden": false, + "m_Value": 3.0, + "m_FloatType": 0, + "m_RangeValues": { + "x": 0.0, + "y": 1.0 + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.DistanceNode", @@ -2570,10 +2732,10 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -373.60003662109377, - "y": 152.8000030517578, - "width": 128.00003051757813, - "height": 93.60000610351563 + "x": -443.99993896484377, + "y": 247.1999969482422, + "width": 128.0, + "height": 93.60002136230469 } }, "m_Slots": [ @@ -2598,6 +2760,42 @@ } } +{ + "m_SGVersion": 0, + "m_Type": "UnityEditor.ShaderGraph.PropertyNode", + "m_ObjectId": "e4319ca600774fa1903bba83a80e3cbe", + "m_Group": { + "m_Id": "" + }, + "m_Name": "Property", + "m_DrawState": { + "m_Expanded": true, + "m_Position": { + "serializedVersion": "2", + "x": -1901.599853515625, + "y": 985.5999755859375, + "width": 132.0, + "height": 33.59991455078125 + } + }, + "m_Slots": [ + { + "m_Id": "92cb2b89b42042b1b41eeb8c4b5160e2" + } + ], + "synonyms": [], + "m_Precision": 0, + "m_PreviewExpanded": true, + "m_DismissedVersion": 0, + "m_PreviewMode": 0, + "m_CustomColors": { + "m_SerializableColors": [] + }, + "m_Property": { + "m_Id": "bd7dd6ceff3c405e8e4350f1a31abbb4" + } +} + { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot", @@ -2640,8 +2838,8 @@ "m_Expanded": true, "m_Position": { "serializedVersion": "2", - "x": -1678.4000244140625, - "y": 606.4000244140625, + "x": -1769.5999755859375, + "y": 594.4000244140625, "width": 124.0, "height": 172.79998779296876 } @@ -2697,54 +2895,6 @@ } } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "efa287e111d748178a59d60c6bfc0f1b", - "m_Id": 0, - "m_DisplayName": "A", - "m_SlotType": 0, - "m_Hidden": false, - "m_ShaderOutputName": "A", - "m_StageCapability": 3, - "m_Value": { - "e00": 2.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 0.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 0.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 0.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot", @@ -2760,54 +2910,6 @@ "m_Labels": [] } -{ - "m_SGVersion": 0, - "m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot", - "m_ObjectId": "f145e2cc2faf43bd8cb9f2b5ec0b6a9c", - "m_Id": 2, - "m_DisplayName": "Out", - "m_SlotType": 1, - "m_Hidden": false, - "m_ShaderOutputName": "Out", - "m_StageCapability": 3, - "m_Value": { - "e00": 0.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 0.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 0.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 0.0 - }, - "m_DefaultValue": { - "e00": 1.0, - "e01": 0.0, - "e02": 0.0, - "e03": 0.0, - "e10": 0.0, - "e11": 1.0, - "e12": 0.0, - "e13": 0.0, - "e20": 0.0, - "e21": 0.0, - "e22": 1.0, - "e23": 0.0, - "e30": 0.0, - "e31": 0.0, - "e32": 0.0, - "e33": 1.0 - } -} - { "m_SGVersion": 0, "m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",