summaryrefslogtreecommitdiffhomepage
path: root/Assets
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2022-12-08 03:57:20 -0500
committerrealtradam <[email protected]>2022-12-08 03:57:20 -0500
commitea0cdb3727701791b1b1bba2c805d02e582eb99f (patch)
tree4cfcef69ae4018daf32f4bceea79021031bfa935 /Assets
parentdd9ee2fabc55b99543a9aff4a6c27263902370bb (diff)
downloadMagnet-Run-3D-ea0cdb3727701791b1b1bba2c805d02e582eb99f.tar.gz
Magnet-Run-3D-ea0cdb3727701791b1b1bba2c805d02e582eb99f.zip
basic 3d physics
Diffstat (limited to 'Assets')
-rw-r--r--Assets/Materials/Ball.mat2
-rw-r--r--Assets/Materials/Ball.physicMaterial14
-rw-r--r--Assets/Materials/Ball.physicMaterial.meta8
-rw-r--r--Assets/Materials/Ground.mat2
-rw-r--r--Assets/Materials/Trail.mat6
-rw-r--r--Assets/Samples.meta8
-rw-r--r--Assets/Samples/ProBuilder.meta8
-rw-r--r--Assets/Samples/ProBuilder/5.0.6.meta8
-rw-r--r--Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support.meta8
-rw-r--r--Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/.sample.json5
-rw-r--r--Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material.meta8
-rw-r--r--Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material/ProBuilder Default URP.mat98
-rw-r--r--Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material/ProBuilder Default URP.mat.meta8
-rw-r--r--Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader.meta8
-rw-r--r--Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader/Standard Vertex Color.shadergraph80
-rw-r--r--Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader/Standard Vertex Color.shadergraph.meta10
-rw-r--r--Assets/Scripts/MovingSphere.cs107
17 files changed, 353 insertions, 35 deletions
diff --git a/Assets/Materials/Ball.mat b/Assets/Materials/Ball.mat
index 05de71f..ac5e636 100644
--- a/Assets/Materials/Ball.mat
+++ b/Assets/Materials/Ball.mat
@@ -98,7 +98,7 @@ Material:
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- - _Smoothness: 0.5
+ - _Smoothness: 0.75
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
diff --git a/Assets/Materials/Ball.physicMaterial b/Assets/Materials/Ball.physicMaterial
new file mode 100644
index 0000000..a7c50b1
--- /dev/null
+++ b/Assets/Materials/Ball.physicMaterial
@@ -0,0 +1,14 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!134 &13400000
+PhysicMaterial:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: Ball
+ dynamicFriction: 0
+ staticFriction: 0
+ bounciness: 0
+ frictionCombine: 1
+ bounceCombine: 1
diff --git a/Assets/Materials/Ball.physicMaterial.meta b/Assets/Materials/Ball.physicMaterial.meta
new file mode 100644
index 0000000..ac4a6cc
--- /dev/null
+++ b/Assets/Materials/Ball.physicMaterial.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 09db7697c314c020fb2fd649227ca7d4
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 13400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Materials/Ground.mat b/Assets/Materials/Ground.mat
index 8591274..8032be5 100644
--- a/Assets/Materials/Ground.mat
+++ b/Assets/Materials/Ground.mat
@@ -98,7 +98,7 @@ Material:
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- - _Smoothness: 0.5
+ - _Smoothness: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
diff --git a/Assets/Materials/Trail.mat b/Assets/Materials/Trail.mat
index 2bb3855..7b0da91 100644
--- a/Assets/Materials/Trail.mat
+++ b/Assets/Materials/Trail.mat
@@ -98,7 +98,7 @@ Material:
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- - _Smoothness: 0.5
+ - _Smoothness: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
@@ -106,8 +106,8 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- - _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- - _Color: {r: 1, g: 1, b: 1, a: 1}
+ - _BaseColor: {r: 1, g: 0, b: 0, a: 1}
+ - _Color: {r: 1, g: 0, b: 0, 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: []
diff --git a/Assets/Samples.meta b/Assets/Samples.meta
new file mode 100644
index 0000000..4a11181
--- /dev/null
+++ b/Assets/Samples.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e99f9bac576230c57be3f803be478913
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Samples/ProBuilder.meta b/Assets/Samples/ProBuilder.meta
new file mode 100644
index 0000000..8d50a6b
--- /dev/null
+++ b/Assets/Samples/ProBuilder.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f4e08e43926bd917ba04aa83974576ac
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Samples/ProBuilder/5.0.6.meta b/Assets/Samples/ProBuilder/5.0.6.meta
new file mode 100644
index 0000000..4bff941
--- /dev/null
+++ b/Assets/Samples/ProBuilder/5.0.6.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c01a98eba0469322eb7dcf8440688c8b
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support.meta b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support.meta
new file mode 100644
index 0000000..4165b02
--- /dev/null
+++ b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0d1dabb4995fa42a98587ac0f3ad3a0f
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/.sample.json b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/.sample.json
new file mode 100644
index 0000000..1901a74
--- /dev/null
+++ b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/.sample.json
@@ -0,0 +1,5 @@
+{
+ "displayName":"Universal Render Pipeline Support",
+ "description": "Shaders and materials for the Universal Render Pipeline.",
+ "createSeparatePackage": false
+}
diff --git a/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material.meta b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material.meta
new file mode 100644
index 0000000..5cb7ca9
--- /dev/null
+++ b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a87ab085704cc400587af8e4ae0899db
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material/ProBuilder Default URP.mat b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material/ProBuilder Default URP.mat
new file mode 100644
index 0000000..5808f92
--- /dev/null
+++ b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material/ProBuilder Default URP.mat
@@ -0,0 +1,98 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &-1558773938535744999
+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: 5
+--- !u!21 &2100000
+Material:
+ serializedVersion: 8
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_Name: ProBuilder Default URP
+ m_Shader: {fileID: 4800000, guid: a5e1047f27bee462089b2bc3104f90fd, type: 3}
+ m_ValidKeywords: []
+ m_InvalidKeywords: []
+ m_LightmapFlags: 4
+ m_EnableInstancingVariants: 0
+ m_DoubleSidedGI: 0
+ m_CustomRenderQueue: -1
+ stringTagMap:
+ MotionVector: User
+ disabledShaderPasses:
+ - MOTIONVECTORS
+ m_SavedProperties:
+ serializedVersion: 3
+ m_TexEnvs:
+ - Texture2D_BF5F6835:
+ m_Texture: {fileID: 2800000, guid: 6344bf96fbda94141a525046d088fb23, type: 3}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ - _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}
+ - _EmissionMap:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ - _MainTex:
+ m_Texture: {fileID: 2800000, guid: 6344bf96fbda94141a525046d088fb23, type: 3}
+ 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}
+ - _SpecGlossMap:
+ m_Texture: {fileID: 0}
+ m_Scale: {x: 1, y: 1}
+ m_Offset: {x: 0, y: 0}
+ m_Ints: []
+ m_Floats:
+ - _AlphaClip: 0
+ - _Blend: 0
+ - _BumpScale: 1
+ - _Cull: 2
+ - _Cutoff: 0.5
+ - _DstBlend: 0
+ - _EnvironmentReflections: 1
+ - _GlossMapScale: 0
+ - _Glossiness: 0
+ - _GlossyReflections: 0
+ - _Metallic: 0
+ - _OcclusionStrength: 1
+ - _QueueOffset: 0
+ - _ReceiveShadows: 1
+ - _Smoothness: 0.5
+ - _SmoothnessTextureChannel: 0
+ - _SpecularHighlights: 1
+ - _SrcBlend: 1
+ - _Surface: 0
+ - _WorkflowMode: 1
+ - _ZWrite: 1
+ m_Colors:
+ - _BaseColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+ - _Color: {r: 0.5, g: 0.5, b: 0.5, a: 1}
+ - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
+ - _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
+ m_BuildTextureStacks: []
diff --git a/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material/ProBuilder Default URP.mat.meta b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material/ProBuilder Default URP.mat.meta
new file mode 100644
index 0000000..82f886e
--- /dev/null
+++ b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Material/ProBuilder Default URP.mat.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 25a9fb42d361f46ad89221f6d301e96e
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 0
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader.meta b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader.meta
new file mode 100644
index 0000000..c6ba145
--- /dev/null
+++ b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 864b60f9a756846af84d0a15e19d7cb4
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader/Standard Vertex Color.shadergraph b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader/Standard Vertex Color.shadergraph
new file mode 100644
index 0000000..1896280
--- /dev/null
+++ b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader/Standard Vertex Color.shadergraph
@@ -0,0 +1,80 @@
+{
+ "m_SerializedProperties": [
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty"
+ },
+ "JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"bc2269d8-e972-49a2-bc9b-b07483d4d1af\"\n },\n \"m_Name\": \"Albedo\",\n \"m_DefaultReferenceName\": \"Texture2D_BF5F6835\",\n \"m_OverrideReferenceName\": \"_MainTex\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": {\n \"m_SerializedTexture\": \"{\\\"texture\\\":{\\\"fileID\\\":2800000,\\\"guid\\\":\\\"6344bf96fbda94141a525046d088fb23\\\",\\\"type\\\":3}}\",\n \"m_Guid\": \"\"\n },\n \"m_Modifiable\": true,\n \"m_DefaultType\": 0\n}"
+ }
+ ],
+ "m_SerializedKeywords": [],
+ "m_SerializableNodes": [
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.PBRMasterNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"c14054c8-a004-44ef-8e82-df9a9face909\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"PBR Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 554.0,\n \"y\": -62.0,\n \"width\": 200.0,\n \"height\": 269.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.PositionMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 9,\\n \\\"m_DisplayName\\\": \\\"Vertex Position\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Position\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 10,\\n \\\"m_DisplayName\\\": \\\"Vertex Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Normal\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.TangentMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 11,\\n \\\"m_DisplayName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Vertex Tangent\\\",\\n \\\"m_StageCapability\\\": 1,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Albedo\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Albedo\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.5,\\n \\\"y\\\": 0.5,\\n \\\"z\\\": 0.5\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.NormalMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Normal\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Normal\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_Space\\\": 3\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.ColorRGBMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"Emission\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Emission\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\",\\n \\\"Z\\\"\\n ],\\n \\\"m_ColorMode\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Metallic\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Metallic\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Smoothness\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"Occlusion\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Occlusion\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"Alpha\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Alpha\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 1.0,\\n \\\"m_DefaultValue\\\": 1.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 8,\\n \\\"m_DisplayName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"AlphaClipThreshold\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.5,\\n \\\"m_DefaultValue\\\": 0.5,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_SerializableSubShaders\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.Rendering.Universal.UniversalPBRSubShader\"\n },\n \"JSONnodeData\": \"{}\"\n }\n ],\n \"m_Model\": 1,\n \"m_SurfaceType\": 0,\n \"m_AlphaMode\": 0,\n \"m_TwoSided\": false\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.SampleTexture2DNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"e7af99c5-ee04-4d25-8b36-8efe7042c842\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Sample Texture 2D\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -326.0472412109375,\n \"y\": -233.05679321289063,\n \"width\": 208.0,\n \"height\": 431.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"RGBA\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"RGBA\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 4,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 5,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 6,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 7,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 2,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\n \\\"m_Labels\\\": [\\n \\\"X\\\"\\n ]\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DInputMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"Texture\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Texture\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Texture\\\": {\\n \\\"m_SerializedTexture\\\": \\\"{\\\\\\\"texture\\\\\\\":{\\\\\\\"instanceID\\\\\\\":0}}\\\",\\n \\\"m_Guid\\\": \\\"\\\"\\n },\\n \\\"m_DefaultType\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.UVMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"UV\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"UV\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0\\n },\\n \\\"m_Labels\\\": [\\n \\\"X\\\",\\n \\\"Y\\\"\\n ],\\n \\\"m_Channel\\\": 0\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.SamplerStateMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 3,\\n \\\"m_DisplayName\\\": \\\"Sampler\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Sampler\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_TextureType\": 0,\n \"m_NormalMapSpace\": 0\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.VertexColorNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"e2cbf0c3-a17e-4403-8e2e-77b387bc2256\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Vertex Color\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -382.979736328125,\n \"y\": 319.5,\n \"width\": 208.0,\n \"height\": 278.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector4MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"x\\\": 1.0,\\n \\\"y\\\": 1.0,\\n \\\"z\\\": 1.0,\\n \\\"w\\\": 1.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"x\\\": 0.0,\\n \\\"y\\\": 0.0,\\n \\\"z\\\": 0.0,\\n \\\"w\\\": 0.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.PropertyNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"2e8c3df0-672d-4d2c-8f2c-335cae20d4c0\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Property\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -533.0,\n \"y\": -236.0,\n \"width\": 115.0,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Texture2DMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Albedo\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n },\n \"m_PropertyGuidSerialized\": \"bc2269d8-e972-49a2-bc9b-b07483d4d1af\"\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.ShaderGraph.MultiplyNode"
+ },
+ "JSONnodeData": "{\n \"m_GuidSerialized\": \"94db3a1e-9e82-41df-b4c6-494ef89bd4b2\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Multiply\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": true,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": 126.0,\n \"y\": -67.0,\n \"width\": 208.0,\n \"height\": 302.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 1,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 2.0,\\n \\\"e01\\\": 2.0,\\n \\\"e02\\\": 2.0,\\n \\\"e03\\\": 2.0,\\n \\\"e10\\\": 2.0,\\n \\\"e11\\\": 2.0,\\n \\\"e12\\\": 2.0,\\n \\\"e13\\\": 2.0,\\n \\\"e20\\\": 2.0,\\n \\\"e21\\\": 2.0,\\n \\\"e22\\\": 2.0,\\n \\\"e23\\\": 2.0,\\n \\\"e30\\\": 2.0,\\n \\\"e31\\\": 2.0,\\n \\\"e32\\\": 2.0,\\n \\\"e33\\\": 2.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n },\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicValueMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 2,\\n \\\"m_DisplayName\\\": \\\"Out\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": {\\n \\\"e00\\\": 0.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 0.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 0.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 0.0\\n },\\n \\\"m_DefaultValue\\\": {\\n \\\"e00\\\": 1.0,\\n \\\"e01\\\": 0.0,\\n \\\"e02\\\": 0.0,\\n \\\"e03\\\": 0.0,\\n \\\"e10\\\": 0.0,\\n \\\"e11\\\": 1.0,\\n \\\"e12\\\": 0.0,\\n \\\"e13\\\": 0.0,\\n \\\"e20\\\": 0.0,\\n \\\"e21\\\": 0.0,\\n \\\"e22\\\": 1.0,\\n \\\"e23\\\": 0.0,\\n \\\"e30\\\": 0.0,\\n \\\"e31\\\": 0.0,\\n \\\"e32\\\": 0.0,\\n \\\"e33\\\": 1.0\\n }\\n}\"\n }\n ],\n \"m_Precision\": 0,\n \"m_PreviewExpanded\": true,\n \"m_CustomColors\": {\n \"m_SerializableColors\": []\n }\n}"
+ }
+ ],
+ "m_Groups": [],
+ "m_StickyNotes": [],
+ "m_SerializableEdges": [
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"2e8c3df0-672d-4d2c-8f2c-335cae20d4c0\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"e7af99c5-ee04-4d25-8b36-8efe7042c842\"\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e2cbf0c3-a17e-4403-8e2e-77b387bc2256\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"94db3a1e-9e82-41df-b4c6-494ef89bd4b2\"\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e7af99c5-ee04-4d25-8b36-8efe7042c842\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"94db3a1e-9e82-41df-b4c6-494ef89bd4b2\"\n }\n}"
+ },
+ {
+ "typeInfo": {
+ "fullName": "UnityEditor.Graphing.Edge"
+ },
+ "JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"94db3a1e-9e82-41df-b4c6-494ef89bd4b2\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"c14054c8-a004-44ef-8e82-df9a9face909\"\n }\n}"
+ }
+ ],
+ "m_PreviewData": {
+ "serializedMesh": {
+ "m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
+ "m_Guid": ""
+ }
+ },
+ "m_Path": "Shader Graphs",
+ "m_ConcretePrecision": 0,
+ "m_ActiveOutputNodeGuidSerialized": "c14054c8-a004-44ef-8e82-df9a9face909"
+} \ No newline at end of file
diff --git a/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader/Standard Vertex Color.shadergraph.meta b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader/Standard Vertex Color.shadergraph.meta
new file mode 100644
index 0000000..fb21912
--- /dev/null
+++ b/Assets/Samples/ProBuilder/5.0.6/Universal Render Pipeline Support/Shader/Standard Vertex Color.shadergraph.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: a5e1047f27bee462089b2bc3104f90fd
+ScriptedImporter:
+ fileIDToRecycleName:
+ 4800000: MainAsset
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
+ script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
diff --git a/Assets/Scripts/MovingSphere.cs b/Assets/Scripts/MovingSphere.cs
index 1f492aa..a839ca7 100644
--- a/Assets/Scripts/MovingSphere.cs
+++ b/Assets/Scripts/MovingSphere.cs
@@ -4,22 +4,34 @@ using UnityEngine;
public class MovingSphere : MonoBehaviour
{
+ Rigidbody body;
+
[SerializeField, Range(1f, 100f)]
float maxSpeed = 10f;
[SerializeField, Range(1f, 100f)]
float maxAcceleration = 10f;
+ [SerializeField, Range(1f, 100f)]
+ float maxAirAcceleration = 1f;
+ Vector3 velocity;
- [SerializeField, Range(0f, 1f)]
- float bounciness = 0.5f;
+ [SerializeField, Range(0f, 10f)]
+ float jumpHeight = 2f;
+ [SerializeField, Range(0, 5)]
+ int maxAirJumps;
+ bool desiredJump;
+ int jumpPhase;
+ bool onGround;
- Rect allowedArea = new Rect(-4.5f, -4.5f, 9f, 9f);
+ // 0.0 means walls
+ // 1.0 means floors
+ float maxJumpAngle = 0.1f;
- Vector3 velocity;
+ Vector3 inputVelocity;
// Start is called before the first frame update
- void Start()
+ void Awake()
{
-
+ body = GetComponent<Rigidbody>();
}
// Update is called once per frame
@@ -31,38 +43,73 @@ public class MovingSphere : MonoBehaviour
);
playerInput = Vector2.ClampMagnitude(playerInput, 1f);
+ desiredJump |= Input.GetButtonDown("Jump");
+
+ inputVelocity = new Vector3(playerInput.x, 0f, playerInput.y);
+
+ }
+
+ void FixedUpdate()
+ {
+ UpdateState();
Vector3 acceleration = new Vector3(
- playerInput.x,
- 0f,
- playerInput.y
- ) * maxAcceleration;
+ inputVelocity.x,
+ 0f,
+ inputVelocity.z
+ );
+
+ if(onGround)
+ acceleration *= maxAcceleration;
+ else
+ acceleration *= maxAirAcceleration;
+
velocity += acceleration * Time.deltaTime;
velocity = Vector3.ClampMagnitude(velocity, maxSpeed);
- Vector3 displacement = velocity * Time.deltaTime;
-
- Vector3 newPosition = transform.localPosition + displacement;
- if(newPosition.x < allowedArea.xMin)
- {
- newPosition.x = allowedArea.xMin;
- velocity.x = -velocity.x * bounciness;
- }
- else if(newPosition.x > allowedArea.xMax)
+ if(desiredJump)
{
- newPosition.x = allowedArea.xMax;
- velocity.x = -velocity.x * bounciness;
+ Debug.Log("Attempted Jump!");
+ desiredJump = false;
+ Jump();
}
- if(newPosition.z < allowedArea.yMin)
- {
- newPosition.z = allowedArea.yMin;
- velocity.z = -velocity.z * bounciness;
- }
- else if(newPosition.z > allowedArea.yMax)
+
+ body.velocity = velocity;
+
+ onGround = false;
+ }
+
+ void UpdateState()
+ {
+ velocity = body.velocity;
+ if(onGround)
+ jumpPhase = 0;
+ }
+
+ void Jump()
+ {
+ if(onGround || jumpPhase < maxAirJumps)
{
- newPosition.z = allowedArea.yMax;
- velocity.z = -velocity.z * bounciness;
+ Debug.Log("Jump!");
+ jumpPhase += 1;
+ float jumpSpeed = Mathf.Sqrt(-2f * Physics.gravity.y * jumpHeight);
+ if(velocity.y > 0f)
+ jumpSpeed = Mathf.Max(jumpSpeed - velocity.y, 0f);
+ velocity.y += jumpSpeed;
}
+ }
+
+ void OnCollisionStay(Collision collision) {
+ EvaluateCollision(collision);
+ }
+
+ void OnCollisionEnter(Collision collision) {
+ EvaluateCollision(collision);
+ }
- transform.localPosition = newPosition;
+ void EvaluateCollision(Collision collision) {
+ for (int i = 0; i < collision.contactCount; i++) {
+ Vector3 normal = collision.GetContact(i).normal;
+ onGround |= normal.y >= maxJumpAngle;
+ }
}
}