Custom encoding/decoding.

Custom vector3 encoding/decoding test.
removed normal decoding from VA functions, this should now be done outside this function to allow easy switching of decoders.

Co-Authored-By: Neeto-rzo <68438932+Neeto-rzo@users.noreply.github.com>
This commit is contained in:
max
2020-12-08 00:33:06 +01:00
parent b63ee2ff02
commit f2b6a61d1e
17 changed files with 1039 additions and 342 deletions

View File

@@ -0,0 +1,296 @@
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "a0f7034d6d504c08acccef904e948ff3",
"m_Properties": [
{
"m_Id": "c7aa86a194644e57b07408803b64ebd7"
}
],
"m_Keywords": [],
"m_Nodes": [
{
"m_Id": "0472300f65924c669d0c8ef792dbf414"
},
{
"m_Id": "c55a8b78e4044bb8be73ef4452e76135"
},
{
"m_Id": "cb267a7eefa34a2483d8f58018f1bb0c"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "c55a8b78e4044bb8be73ef4452e76135"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "cb267a7eefa34a2483d8f58018f1bb0c"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "cb267a7eefa34a2483d8f58018f1bb0c"
},
"m_SlotId": 1
},
"m_InputSlot": {
"m_Node": {
"m_Id": "0472300f65924c669d0c8ef792dbf414"
},
"m_SlotId": 1
}
}
],
"m_VertexContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_FragmentContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_PreviewData": {
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
}
},
"m_Path": "Sub Graphs",
"m_ConcretePrecision": 0,
"m_OutputNode": {
"m_Id": "0472300f65924c669d0c8ef792dbf414"
},
"m_ActiveTargets": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode",
"m_ObjectId": "0472300f65924c669d0c8ef792dbf414",
"m_Group": {
"m_Id": ""
},
"m_Name": "Output",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -458.0,
"y": -2.0,
"width": 97.0,
"height": 77.0
}
},
"m_Slots": [
{
"m_Id": "9d0a22c11f7347cf85910e670a28a7b2"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"IsFirstSlotValid": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "121791ffa91b4ae087bcb644cd91a09b",
"m_Id": 0,
"m_DisplayName": "Vector1",
"m_SlotType": 1,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "206320e6a1984736b1513c9eed70af22",
"m_Id": 1,
"m_DisplayName": "vector3",
"m_SlotType": 1,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "vector3",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "2f0e331f581747c9baca83433ff3a875",
"m_Id": 0,
"m_DisplayName": "vector1",
"m_SlotType": 0,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "vector1",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "9d0a22c11f7347cf85910e670a28a7b2",
"m_Id": 1,
"m_DisplayName": "Vector3",
"m_SlotType": 0,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "Vector3",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "c55a8b78e4044bb8be73ef4452e76135",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -803.0,
"y": 38.0,
"width": 115.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "121791ffa91b4ae087bcb644cd91a09b"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "c7aa86a194644e57b07408803b64ebd7"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "c7aa86a194644e57b07408803b64ebd7",
"m_Guid": {
"m_GuidSerialized": "9bf172a7-cce3-4c15-b3c5-10db50121814"
},
"m_Name": "Vector1",
"m_DefaultReferenceName": "Vector1_c7aa86a194644e57b07408803b64ebd7",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_Precision": 0,
"m_GPUInstanced": false,
"m_Hidden": false,
"m_Value": 0.0,
"m_FloatType": 0,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "cb267a7eefa34a2483d8f58018f1bb0c",
"m_Group": {
"m_Id": ""
},
"m_Name": "Custom Function",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -669.0,
"y": -2.0,
"width": 181.0,
"height": 94.0
}
},
"m_Slots": [
{
"m_Id": "2f0e331f581747c9baca83433ff3a875"
},
{
"m_Id": "206320e6a1984736b1513c9eed70af22"
}
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 0,
"m_FunctionName": "Decode2Float1ToFloat3",
"m_FunctionSource": "02eb5540183369645883b2c6b33144dc",
"m_FunctionBody": "Enter function body here..."
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 64cf0bab3459e65479c62da5bc7e8a33
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

View File

@@ -0,0 +1,500 @@
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "a0a2fdc9c1a4498195631e1da43ae9d8",
"m_Properties": [
{
"m_Id": "771ac3b08a1144b086078a0d07c220da"
}
],
"m_Keywords": [],
"m_Nodes": [
{
"m_Id": "966c13a2f0a94a189243c9f0d9524146"
},
{
"m_Id": "b1d371a1c68245c59eaee45d4d61c533"
},
{
"m_Id": "95caa98ec1fe4b12be341a504a26521c"
},
{
"m_Id": "263e3f691adc4e89ae69574634db2de6"
},
{
"m_Id": "5c342c9c5ab943a6ab1d9499425f19e0"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "263e3f691adc4e89ae69574634db2de6"
},
"m_SlotId": 1
},
"m_InputSlot": {
"m_Node": {
"m_Id": "5c342c9c5ab943a6ab1d9499425f19e0"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "5c342c9c5ab943a6ab1d9499425f19e0"
},
"m_SlotId": 1
},
"m_InputSlot": {
"m_Node": {
"m_Id": "966c13a2f0a94a189243c9f0d9524146"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "b1d371a1c68245c59eaee45d4d61c533"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "263e3f691adc4e89ae69574634db2de6"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "b1d371a1c68245c59eaee45d4d61c533"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "95caa98ec1fe4b12be341a504a26521c"
},
"m_SlotId": 0
}
}
],
"m_VertexContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_FragmentContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_PreviewData": {
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
}
},
"m_Path": "Sub Graphs",
"m_ConcretePrecision": 0,
"m_OutputNode": {
"m_Id": "966c13a2f0a94a189243c9f0d9524146"
},
"m_ActiveTargets": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "118dcba6ddd7426b8bd4d80808b125fc",
"m_Id": 0,
"m_DisplayName": "f1",
"m_SlotType": 0,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "f1",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "124ded35cbdf4fa58367d2a2bf5374dc",
"m_Id": 1,
"m_DisplayName": "f3",
"m_SlotType": 1,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "f3",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "263e3f691adc4e89ae69574634db2de6",
"m_Group": {
"m_Id": ""
},
"m_Name": "Custom Function",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -81.0,
"y": 325.0,
"width": 208.0,
"height": 278.0
}
},
"m_Slots": [
{
"m_Id": "32a19e0ffeb54588b2a8f5c9e2a738cd"
},
{
"m_Id": "e5b6dcbec075435fbc9af85799fe6420"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 0,
"m_FunctionName": "FloatToFloat2",
"m_FunctionSource": "02eb5540183369645883b2c6b33144dc",
"m_FunctionBody": "Enter function body here..."
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "32a19e0ffeb54588b2a8f5c9e2a738cd",
"m_Id": 0,
"m_DisplayName": "f1",
"m_SlotType": 0,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "f1",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "5c342c9c5ab943a6ab1d9499425f19e0",
"m_Group": {
"m_Id": ""
},
"m_Name": "Custom Function",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 157.0,
"y": 325.0,
"width": 208.0,
"height": 278.0
}
},
"m_Slots": [
{
"m_Id": "e613aa81b1a9434aac59f67e9ae7339b"
},
{
"m_Id": "7c8b7afd842e45a5960396a7de8d42f0"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 0,
"m_FunctionName": "Float2ToFloat3",
"m_FunctionSource": "02eb5540183369645883b2c6b33144dc",
"m_FunctionBody": "Enter function body here..."
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "771ac3b08a1144b086078a0d07c220da",
"m_Guid": {
"m_GuidSerialized": "000a9ca6-880e-4eee-a436-af6921fc25b8"
},
"m_Name": "Vector1",
"m_DefaultReferenceName": "Vector1_771ac3b08a1144b086078a0d07c220da",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_Precision": 0,
"m_GPUInstanced": false,
"m_Hidden": false,
"m_Value": 0.23919999599456788,
"m_FloatType": 0,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "7c8b7afd842e45a5960396a7de8d42f0",
"m_Id": 1,
"m_DisplayName": "f3",
"m_SlotType": 1,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "f3",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "95caa98ec1fe4b12be341a504a26521c",
"m_Group": {
"m_Id": ""
},
"m_Name": "Custom Function",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -75.0,
"y": 3.0,
"width": 208.0,
"height": 278.0
}
},
"m_Slots": [
{
"m_Id": "118dcba6ddd7426b8bd4d80808b125fc"
},
{
"m_Id": "124ded35cbdf4fa58367d2a2bf5374dc"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 0,
"m_FunctionName": "FloatToFloat3",
"m_FunctionSource": "02eb5540183369645883b2c6b33144dc",
"m_FunctionBody": "Enter function body here..."
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode",
"m_ObjectId": "966c13a2f0a94a189243c9f0d9524146",
"m_Group": {
"m_Id": ""
},
"m_Name": "Output",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 538.0,
"y": 9.5367431640625e-7,
"width": 120.00000762939453,
"height": 77.00000762939453
}
},
"m_Slots": [
{
"m_Id": "b220757e741547ccaa7b90e39ecc4acb"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"IsFirstSlotValid": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "b1d371a1c68245c59eaee45d4d61c533",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -219.0,
"y": 43.0,
"width": 115.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "f2355e12360c41d8be5dbcb32f44c13d"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "771ac3b08a1144b086078a0d07c220da"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "b220757e741547ccaa7b90e39ecc4acb",
"m_Id": 1,
"m_DisplayName": "Out_Vector3",
"m_SlotType": 0,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "OutVector3",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "e5b6dcbec075435fbc9af85799fe6420",
"m_Id": 1,
"m_DisplayName": "f2",
"m_SlotType": 1,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "f2",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": [
"X",
"Y"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "e613aa81b1a9434aac59f67e9ae7339b",
"m_Id": 0,
"m_DisplayName": "f2 (1)",
"m_SlotType": 0,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "f2",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": [
"X",
"Y"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "f2355e12360c41d8be5dbcb32f44c13d",
"m_Id": 0,
"m_DisplayName": "Vector1",
"m_SlotType": 1,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 18ce5782075ebe745a6c31bffe3ff85e
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

View File

@@ -0,0 +1,296 @@
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "a0f7034d6d504c08acccef904e948ff3",
"m_Properties": [
{
"m_Id": "c7aa86a194644e57b07408803b64ebd7"
}
],
"m_Keywords": [],
"m_Nodes": [
{
"m_Id": "0472300f65924c669d0c8ef792dbf414"
},
{
"m_Id": "c55a8b78e4044bb8be73ef4452e76135"
},
{
"m_Id": "cb267a7eefa34a2483d8f58018f1bb0c"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "c55a8b78e4044bb8be73ef4452e76135"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "cb267a7eefa34a2483d8f58018f1bb0c"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "cb267a7eefa34a2483d8f58018f1bb0c"
},
"m_SlotId": 1
},
"m_InputSlot": {
"m_Node": {
"m_Id": "0472300f65924c669d0c8ef792dbf414"
},
"m_SlotId": 1
}
}
],
"m_VertexContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_FragmentContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_PreviewData": {
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
}
},
"m_Path": "Sub Graphs",
"m_ConcretePrecision": 0,
"m_OutputNode": {
"m_Id": "0472300f65924c669d0c8ef792dbf414"
},
"m_ActiveTargets": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode",
"m_ObjectId": "0472300f65924c669d0c8ef792dbf414",
"m_Group": {
"m_Id": ""
},
"m_Name": "Output",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -458.0,
"y": -2.0,
"width": 97.0,
"height": 77.0
}
},
"m_Slots": [
{
"m_Id": "9d0a22c11f7347cf85910e670a28a7b2"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"IsFirstSlotValid": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "121791ffa91b4ae087bcb644cd91a09b",
"m_Id": 0,
"m_DisplayName": "Vector1",
"m_SlotType": 1,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "848145a6436e4e8aba88f8ef1a124b78",
"m_Id": 1,
"m_DisplayName": "f3",
"m_SlotType": 1,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "f3",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "9d0a22c11f7347cf85910e670a28a7b2",
"m_Id": 1,
"m_DisplayName": "Vector3",
"m_SlotType": 0,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "Vector3",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "c55a8b78e4044bb8be73ef4452e76135",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -803.0,
"y": 38.0,
"width": 115.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "121791ffa91b4ae087bcb644cd91a09b"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "c7aa86a194644e57b07408803b64ebd7"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "c7aa86a194644e57b07408803b64ebd7",
"m_Guid": {
"m_GuidSerialized": "9bf172a7-cce3-4c15-b3c5-10db50121814"
},
"m_Name": "Vector1",
"m_DefaultReferenceName": "Vector1_c7aa86a194644e57b07408803b64ebd7",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_Precision": 0,
"m_GPUInstanced": false,
"m_Hidden": false,
"m_Value": 0.0,
"m_FloatType": 0,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "cb267a7eefa34a2483d8f58018f1bb0c",
"m_Group": {
"m_Id": ""
},
"m_Name": "Custom Function",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -669.0,
"y": -1.0,
"width": 142.0,
"height": 94.0
}
},
"m_Slots": [
{
"m_Id": "f44972630e70452686fb82e2cd3a9e44"
},
{
"m_Id": "848145a6436e4e8aba88f8ef1a124b78"
}
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 0,
"m_FunctionName": "DecodeFloat1ToFloat3",
"m_FunctionSource": "02eb5540183369645883b2c6b33144dc",
"m_FunctionBody": "Enter function body here..."
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "f44972630e70452686fb82e2cd3a9e44",
"m_Id": 0,
"m_DisplayName": "f1",
"m_SlotType": 0,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "f1",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7f3356cfbf53f3741b12d5aa82ff460a
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

View File

@@ -0,0 +1,296 @@
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "bf747e57d27543eea05553ea33648cbe",
"m_Properties": [
{
"m_Id": "f4f17c3262704090a48f16ca7b479fe2"
}
],
"m_Keywords": [],
"m_Nodes": [
{
"m_Id": "f4bc27e4e711454b9e1074a9ae7debfc"
},
{
"m_Id": "0fa848991aa047428743c4057e9d1b7c"
},
{
"m_Id": "85156a1cafc84b86ac61aec37908a779"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "0fa848991aa047428743c4057e9d1b7c"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "85156a1cafc84b86ac61aec37908a779"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "85156a1cafc84b86ac61aec37908a779"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "f4bc27e4e711454b9e1074a9ae7debfc"
},
"m_SlotId": 1
}
}
],
"m_VertexContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_FragmentContext": {
"m_Position": {
"x": 0.0,
"y": 0.0
},
"m_Blocks": []
},
"m_PreviewData": {
"serializedMesh": {
"m_SerializedMesh": "{\"mesh\":{\"instanceID\":0}}",
"m_Guid": ""
}
},
"m_Path": "Sub Graphs",
"m_ConcretePrecision": 0,
"m_OutputNode": {
"m_Id": "f4bc27e4e711454b9e1074a9ae7debfc"
},
"m_ActiveTargets": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "0fa848991aa047428743c4057e9d1b7c",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -1044.0,
"y": 35.000003814697269,
"width": 119.00000762939453,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "da67a8cccc5e47829fbfcf50aead1f3e"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "f4f17c3262704090a48f16ca7b479fe2"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "285ef83ab3394450b82148d63dacc74d",
"m_Id": 1,
"m_DisplayName": "Vector1",
"m_SlotType": 0,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "Vector1",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "51aaf4c369c042f28efedb410527046a",
"m_Id": 1,
"m_DisplayName": "vector3",
"m_SlotType": 0,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "vector3",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "85156a1cafc84b86ac61aec37908a779",
"m_Group": {
"m_Id": ""
},
"m_Name": "Custom Function",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -870.0,
"y": -5.00000524520874,
"width": 181.0,
"height": 94.0
}
},
"m_Slots": [
{
"m_Id": "51aaf4c369c042f28efedb410527046a"
},
{
"m_Id": "af9842cba20446ec90d8a3d622f30915"
}
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 0,
"m_FunctionName": "Encode2Float3ToFloat1",
"m_FunctionSource": "02eb5540183369645883b2c6b33144dc",
"m_FunctionBody": "Enter function body here..."
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "af9842cba20446ec90d8a3d622f30915",
"m_Id": 0,
"m_DisplayName": "vector1",
"m_SlotType": 1,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "vector1",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"X"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "da67a8cccc5e47829fbfcf50aead1f3e",
"m_Id": 0,
"m_DisplayName": "Vector3",
"m_SlotType": 1,
"m_Priority": 2147483647,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": [
"X",
"Y",
"Z"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode",
"m_ObjectId": "f4bc27e4e711454b9e1074a9ae7debfc",
"m_Group": {
"m_Id": ""
},
"m_Name": "Output",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -661.0,
"y": -5.00000524520874,
"width": 93.0,
"height": 77.0
}
},
"m_Slots": [
{
"m_Id": "285ef83ab3394450b82148d63dacc74d"
}
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_CustomColors": {
"m_SerializableColors": []
},
"IsFirstSlotValid": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector3ShaderProperty",
"m_ObjectId": "f4f17c3262704090a48f16ca7b479fe2",
"m_Guid": {
"m_GuidSerialized": "7b9cf9eb-5e6f-4909-bd26-ac9788a9c2b4"
},
"m_Name": "Vector3",
"m_DefaultReferenceName": "Vector3_f4f17c3262704090a48f16ca7b479fe2",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": true,
"m_Precision": 0,
"m_GPUInstanced": false,
"m_Hidden": false,
"m_Value": {
"x": 1.0,
"y": 1.0,
"z": 1.0,
"w": 0.0
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 4e060d9f63bdc144c9b64d247cb2006e
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 724cb4c5ff5f0d24ba62eed1ed67add2
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 60072b568d64c40a485e0fc55012dc9f, type: 3}