Archived
Leaves
This commit is contained in:
1 parent
dd11842558
commit
7ee4755a6a
4 files changed
+61
-27
No files matched your search
@@ -1,25 +1,18 @@
|
|||||||
{
|
{
|
||||||
"m_SerializedProperties": [
|
"m_SerializedProperties": [],
|
||||||
{
|
|
||||||
"typeInfo": {
|
|
||||||
"fullName": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty"
|
|
||||||
},
|
|
||||||
"JSONnodeData": "{\n \"m_Guid\": {\n \"m_GuidSerialized\": \"ebb163b4-73ca-4f43-81d9-f01668693642\"\n },\n \"m_Name\": \"Smoothness\",\n \"m_DefaultReferenceName\": \"Vector1_8EEC20FB\",\n \"m_OverrideReferenceName\": \"\",\n \"m_GeneratePropertyBlock\": true,\n \"m_Precision\": 0,\n \"m_GPUInstanced\": false,\n \"m_Hidden\": false,\n \"m_Value\": 0.5,\n \"m_FloatType\": 1,\n \"m_RangeValues\": {\n \"x\": 0.0,\n \"y\": 1.0\n }\n}"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"m_SerializedKeywords": [],
|
"m_SerializedKeywords": [],
|
||||||
"m_SerializableNodes": [
|
"m_SerializableNodes": [
|
||||||
{
|
{
|
||||||
"typeInfo": {
|
"typeInfo": {
|
||||||
"fullName": "UnityEditor.ShaderGraph.PBRMasterNode"
|
"fullName": "UnityEditor.ShaderGraph.PBRMasterNode"
|
||||||
},
|
},
|
||||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"95a9d98a-aa06-48ab-9f92-9ce2e7ff0b6b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"PBR Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": false,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -166.00006103515626,\n \"y\": -5.999995708465576,\n \"width\": 200.00001525878907,\n \"height\": 125.00000762939453\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.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\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_ShaderOutputNaLine truncated
|
"JSONnodeData": "{\n \"m_GuidSerialized\": \"95a9d98a-aa06-48ab-9f92-9ce2e7ff0b6b\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"PBR Master\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": false,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -58.0,\n \"y\": -29.0,\n \"width\": 200.0,\n \"height\": 125.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.7353569269180298,\\n \\\"y\\\": 0.7353569269180298,\\n \\\"z\\\": 0.7353569269180298\\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_StageCapabilityLine truncated
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"typeInfo": {
|
"typeInfo": {
|
||||||
"fullName": "UnityEditor.ShaderGraph.PropertyNode"
|
"fullName": "UnityEditor.ShaderGraph.SplitNode"
|
||||||
},
|
},
|
||||||
"JSONnodeData": "{\n \"m_GuidSerialized\": \"e7286c87-1d71-43ac-8332-edf061cc3190\",\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\": -383.0000305175781,\n \"y\": 116.00001525878906,\n \"width\": 149.00001525878907,\n \"height\": 34.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.Vector1MaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"Smoothness\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"Out\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\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_PropertyGuidSerialized\": \"ebb163b4-73ca-4f43-81d9-f01668693642\"\n}"
|
"JSONnodeData": "{\n \"m_GuidSerialized\": \"1808df2d-4b66-4b9e-ab8d-b30d859fa5a7\",\n \"m_GroupGuidSerialized\": \"00000000-0000-0000-0000-000000000000\",\n \"m_Name\": \"Split\",\n \"m_NodeVersion\": 0,\n \"m_DrawState\": {\n \"m_Expanded\": false,\n \"m_Position\": {\n \"serializedVersion\": \"2\",\n \"x\": -210.0,\n \"y\": 72.0,\n \"width\": 127.0,\n \"height\": 77.0\n }\n },\n \"m_SerializableSlots\": [\n {\n \"typeInfo\": {\n \"fullName\": \"UnityEditor.ShaderGraph.DynamicVectorMaterialSlot\"\n },\n \"JSONnodeData\": \"{\\n \\\"m_Id\\\": 0,\\n \\\"m_DisplayName\\\": \\\"In\\\",\\n \\\"m_SlotType\\\": 0,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"In\\\",\\n \\\"m_StageCapability\\\": 3,\\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\\\": 1,\\n \\\"m_DisplayName\\\": \\\"R\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"R\\\",\\n \\\"m_StageCapability\\\": 3,\\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\\\": 2,\\n \\\"m_DisplayName\\\": \\\"G\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"G\\\",\\n \\\"m_StageCapability\\\": 3,\\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\\\": 3,\\n \\\"m_DisplayName\\\": \\\"B\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"B\\\",\\n \\\"m_StageCapability\\\": 3,\\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\\\": 4,\\n \\\"m_DisplayName\\\": \\\"A\\\",\\n \\\"m_SlotType\\\": 1,\\n \\\"m_Priority\\\": 2147483647,\\n \\\"m_Hidden\\\": false,\\n \\\"m_ShaderOutputName\\\": \\\"A\\\",\\n \\\"m_StageCapability\\\": 3,\\n \\\"m_Value\\\": 0.0,\\n \\\"m_DefaultValue\\\": 0.0,\\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}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"typeInfo": {
|
"typeInfo": {
|
||||||
@@ -43,12 +36,6 @@
|
|||||||
"m_Groups": [],
|
"m_Groups": [],
|
||||||
"m_StickyNotes": [],
|
"m_StickyNotes": [],
|
||||||
"m_SerializableEdges": [
|
"m_SerializableEdges": [
|
||||||
{
|
|
||||||
"typeInfo": {
|
|
||||||
"fullName": "UnityEditor.Graphing.Edge"
|
|
||||||
},
|
|
||||||
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"e7286c87-1d71-43ac-8332-edf061cc3190\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 5,\n \"m_NodeGUIDSerialized\": \"95a9d98a-aa06-48ab-9f92-9ce2e7ff0b6b\"\n }\n}"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"typeInfo": {
|
"typeInfo": {
|
||||||
"fullName": "UnityEditor.Graphing.Edge"
|
"fullName": "UnityEditor.Graphing.Edge"
|
||||||
@@ -72,6 +59,18 @@
|
|||||||
"fullName": "UnityEditor.Graphing.Edge"
|
"fullName": "UnityEditor.Graphing.Edge"
|
||||||
},
|
},
|
||||||
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"74abd017-3fff-4a75-a3a7-8642482eb9c6\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"1316d71d-2778-4f0e-a302-bd8350708751\"\n }\n}"
|
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 1,\n \"m_NodeGUIDSerialized\": \"74abd017-3fff-4a75-a3a7-8642482eb9c6\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"1316d71d-2778-4f0e-a302-bd8350708751\"\n }\n}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"typeInfo": {
|
||||||
|
"fullName": "UnityEditor.Graphing.Edge"
|
||||||
|
},
|
||||||
|
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 2,\n \"m_NodeGUIDSerialized\": \"1316d71d-2778-4f0e-a302-bd8350708751\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 0,\n \"m_NodeGUIDSerialized\": \"1808df2d-4b66-4b9e-ab8d-b30d859fa5a7\"\n }\n}"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"typeInfo": {
|
||||||
|
"fullName": "UnityEditor.Graphing.Edge"
|
||||||
|
},
|
||||||
|
"JSONnodeData": "{\n \"m_OutputSlot\": {\n \"m_SlotId\": 4,\n \"m_NodeGUIDSerialized\": \"1808df2d-4b66-4b9e-ab8d-b30d859fa5a7\"\n },\n \"m_InputSlot\": {\n \"m_SlotId\": 5,\n \"m_NodeGUIDSerialized\": \"95a9d98a-aa06-48ab-9f92-9ce2e7ff0b6b\"\n }\n}"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"m_PreviewData": {
|
"m_PreviewData": {
|
||||||
|
|||||||
@@ -152,11 +152,12 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
depth: 8
|
depth: 8
|
||||||
mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
leafMesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
material: {fileID: 2100000, guid: 8f3914ac4291e664ba60ae208ae66460, type: 2}
|
material: {fileID: 2100000, guid: 8f3914ac4291e664ba60ae208ae66460, type: 2}
|
||||||
gradientA:
|
gradientA:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 1, g: 1, b: 1, a: 1}
|
key0: {r: 1, g: 1, b: 1, a: 0.3137255}
|
||||||
key1: {r: 1, g: 0, b: 0, a: 1}
|
key1: {r: 1, g: 0, b: 0, a: 0.3529412}
|
||||||
key2: {r: 0, g: 0, b: 0, a: 0}
|
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||||
@@ -184,8 +185,8 @@ MonoBehaviour:
|
|||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 2
|
||||||
gradientB:
|
gradientB:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
key0: {r: 0, g: 0, b: 1, a: 1}
|
key0: {r: 0, g: 0, b: 1, a: 0.54901963}
|
||||||
key1: {r: 1, g: 1, b: 1, a: 1}
|
key1: {r: 1, g: 1, b: 1, a: 0.627451}
|
||||||
key2: {r: 1, g: 1, b: 0, a: 0}
|
key2: {r: 1, g: 1, b: 0, a: 0}
|
||||||
key3: {r: 0, g: 0, b: 0, a: 0}
|
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||||
key4: {r: 0, g: 0, b: 0, a: 0}
|
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||||
@@ -211,6 +212,8 @@ MonoBehaviour:
|
|||||||
m_Mode: 0
|
m_Mode: 0
|
||||||
m_NumColorKeys: 3
|
m_NumColorKeys: 3
|
||||||
m_NumAlphaKeys: 2
|
m_NumAlphaKeys: 2
|
||||||
|
leafColorA: {r: 0.45882356, g: 0.97647065, b: 0.29803923, a: 0.49803922}
|
||||||
|
leafColorB: {r: 0.21568629, g: 0.4901961, b: 0.13333334, a: 0.9019608}
|
||||||
--- !u!4 &197491476
|
--- !u!4 &197491476
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@@ -53,12 +53,15 @@ public class Fractal : MonoBehaviour
|
|||||||
|
|
||||||
NativeArray<float3x4>[] matrices;
|
NativeArray<float3x4>[] matrices;
|
||||||
|
|
||||||
[SerializeField, Range(2, 8)]
|
[SerializeField, Range(3, 8)]
|
||||||
int depth = 4;
|
int depth = 4;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
Mesh mesh = default;
|
Mesh mesh = default;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
Mesh leafMesh = default;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
Material material = default;
|
Material material = default;
|
||||||
|
|
||||||
@@ -68,6 +71,12 @@ public class Fractal : MonoBehaviour
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
Gradient gradientB = default;
|
Gradient gradientB = default;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
Color leafColorA = default;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
Color leafColorB = default;
|
||||||
|
|
||||||
static float3[] directions =
|
static float3[] directions =
|
||||||
{
|
{
|
||||||
up(), right(), left(), forward(), back()
|
up(), right(), left(), forward(), back()
|
||||||
@@ -112,7 +121,7 @@ public class Fractal : MonoBehaviour
|
|||||||
parts[i] = new NativeArray<FractalPart>(length, Allocator.Persistent);
|
parts[i] = new NativeArray<FractalPart>(length, Allocator.Persistent);
|
||||||
matrices[i] = new NativeArray<float3x4>(length, Allocator.Persistent);
|
matrices[i] = new NativeArray<float3x4>(length, Allocator.Persistent);
|
||||||
matricesBuffers[i] = new ComputeBuffer(length, stride);
|
matricesBuffers[i] = new ComputeBuffer(length, stride);
|
||||||
sequenceNumbers[i] = new Vector4(Random.value, Random.value);
|
sequenceNumbers[i] = new Vector4(Random.value, Random.value, Random.value, Random.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
parts[0][0] = CreatePart(0);
|
parts[0][0] = CreatePart(0);
|
||||||
@@ -188,8 +197,25 @@ public class Fractal : MonoBehaviour
|
|||||||
jobHandle.Complete();
|
jobHandle.Complete();
|
||||||
|
|
||||||
var bounds = new Bounds(rootPart.worldPosition, float3(3f * objectScale));
|
var bounds = new Bounds(rootPart.worldPosition, float3(3f * objectScale));
|
||||||
|
int leafIndex = matricesBuffers.Length - 1;
|
||||||
for (int i = 0; i < matricesBuffers.Length; i++)
|
for (int i = 0; i < matricesBuffers.Length; i++)
|
||||||
{
|
{
|
||||||
|
Mesh instanceMesh;
|
||||||
|
Color colorA, colorB;
|
||||||
|
if (i == leafIndex)
|
||||||
|
{
|
||||||
|
colorA = leafColorA;
|
||||||
|
colorB = leafColorB;
|
||||||
|
instanceMesh = leafMesh;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
colorA = gradientA.Evaluate(i / (matricesBuffers.Length - 2f));
|
||||||
|
colorB = gradientB.Evaluate(i / (matricesBuffers.Length - 2f));
|
||||||
|
instanceMesh = mesh;
|
||||||
|
}
|
||||||
|
propertyBlock.SetColor(colorAId, colorA);
|
||||||
|
propertyBlock.SetColor(colorBId, colorB);
|
||||||
ComputeBuffer buffer = matricesBuffers[i];
|
ComputeBuffer buffer = matricesBuffers[i];
|
||||||
buffer.SetData(matrices[i]);
|
buffer.SetData(matrices[i]);
|
||||||
float gradientInterpolator = i / (matricesBuffers.Length - 1f);
|
float gradientInterpolator = i / (matricesBuffers.Length - 1f);
|
||||||
@@ -197,7 +223,7 @@ public class Fractal : MonoBehaviour
|
|||||||
propertyBlock.SetColor(colorBId, gradientB.Evaluate(gradientInterpolator));
|
propertyBlock.SetColor(colorBId, gradientB.Evaluate(gradientInterpolator));
|
||||||
propertyBlock.SetBuffer(matricesId, buffer);
|
propertyBlock.SetBuffer(matricesId, buffer);
|
||||||
propertyBlock.SetVector(sequenceNumbersId, sequenceNumbers[i]);
|
propertyBlock.SetVector(sequenceNumbersId, sequenceNumbers[i]);
|
||||||
Graphics.DrawMeshInstancedProcedural(mesh, 0, material, bounds, buffer.count, propertyBlock);
|
Graphics.DrawMeshInstancedProcedural(instanceMesh, 0, material, bounds, buffer.count, propertyBlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,14 +4,20 @@
|
|||||||
|
|
||||||
float4 _ColorA, _ColorB;
|
float4 _ColorA, _ColorB;
|
||||||
|
|
||||||
float2 _SequenceNumbers;
|
float4 _SequenceNumbers;
|
||||||
|
|
||||||
float4 GetFractalColor () {
|
float4 GetFractalColor () {
|
||||||
#if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED)
|
#if defined(UNITY_PROCEDURAL_INSTANCING_ENABLED)
|
||||||
return lerp(
|
float4 color;
|
||||||
_ColorA, _ColorB,
|
color.rgb = lerp(
|
||||||
|
_ColorA.rgb, _ColorB.rgb,
|
||||||
frac(unity_InstanceID * _SequenceNumbers.x + _SequenceNumbers.y)
|
frac(unity_InstanceID * _SequenceNumbers.x + _SequenceNumbers.y)
|
||||||
);
|
);
|
||||||
|
color.a = lerp(
|
||||||
|
_ColorA.a, _ColorB.a,
|
||||||
|
frac(unity_InstanceID * _SequenceNumbers.z + _SequenceNumbers.w)
|
||||||
|
);
|
||||||
|
return color;
|
||||||
#else
|
#else
|
||||||
return _ColorA;
|
return _ColorA;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in new issue
Block a user