Files
Convention-Unity/Convention/[Art]/SubGraphs/WorldspaceFromDepth.shadersubgraph

649 lines
15 KiB
Plaintext
Raw Normal View History

2025-07-24 15:41:28 +08:00
{
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "7b55909c76714c2db4d48e664dbcc92b",
"m_Properties": [
{
"m_Id": "173f8d8c3d5f48e58358e9bc8a6718d9"
},
{
"m_Id": "351c706bfb6b4a2ab243a648fa5d12fa"
},
{
"m_Id": "f4801762327f410b854ba9c13cebfcde"
}
],
"m_Keywords": [],
"m_Dropdowns": [],
"m_CategoryData": [
{
"m_Id": "84feca52a05a4342ac915d4ada6ab344"
}
],
"m_Nodes": [
{
"m_Id": "c4af25c4e3784944aa9d1ab0ee575ad6"
},
{
"m_Id": "02e9280a39d144fc96309dea8957aed0"
},
{
"m_Id": "a4d0462fcb5f45cc8ec9e85d3828575f"
},
{
"m_Id": "14b94eccbc4247fcbd716b37d577aec9"
},
{
"m_Id": "11168e770bf74154953eb7f7a740354c"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "02e9280a39d144fc96309dea8957aed0"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "11168e770bf74154953eb7f7a740354c"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "11168e770bf74154953eb7f7a740354c"
},
"m_SlotId": 3
},
"m_InputSlot": {
"m_Node": {
"m_Id": "c4af25c4e3784944aa9d1ab0ee575ad6"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "14b94eccbc4247fcbd716b37d577aec9"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "11168e770bf74154953eb7f7a740354c"
},
"m_SlotId": 2
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "a4d0462fcb5f45cc8ec9e85d3828575f"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "11168e770bf74154953eb7f7a740354c"
},
"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": ""
},
"preventRotation": false
},
"m_Path": "Sub Graphs",
"m_GraphPrecision": 1,
"m_PreviewMode": 2,
"m_OutputNode": {
"m_Id": "c4af25c4e3784944aa9d1ab0ee575ad6"
},
"m_ActiveTargets": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "02e9280a39d144fc96309dea8957aed0",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -727.0,
"y": -729.0,
"width": 93.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "32888c42b68046e598934534dc363636"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "173f8d8c3d5f48e58358e9bc8a6718d9"
}
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "11168e770bf74154953eb7f7a740354c",
"m_Group": {
"m_Id": ""
},
"m_Name": "DepthToWorldPos (Custom Function)",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -553.0,
"y": -745.0,
"width": 259.0,
"height": 142.0
}
},
"m_Slots": [
{
"m_Id": "5594f2633b7348c5a865cc1ae767f5e6"
},
{
"m_Id": "4596ee9afe7a4377a2d718ea83de035e"
},
{
"m_Id": "f367a0b113ca4b2691d186fc429d6688"
},
{
"m_Id": "21ba980160754584983d206639aa661e"
}
],
"synonyms": [
"code",
"HLSL"
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 1,
"m_FunctionName": "DepthToWorldPos",
"m_FunctionSource": "",
"m_FunctionBody": "PositionWS = ComputeWorldSpacePosition(UV, depth, _matrix);"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "14b94eccbc4247fcbd716b37d577aec9",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -803.0,
"y": -620.0,
"width": 211.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "644b727c1ef047d8b0afa7256b6db1b2"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "f4801762327f410b854ba9c13cebfcde"
}
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector2ShaderProperty",
"m_ObjectId": "173f8d8c3d5f48e58358e9bc8a6718d9",
"m_Guid": {
"m_GuidSerialized": "5a6ab260-a1eb-46a0-92cd-bcb38d75ec15"
},
"m_Name": "UV",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "UV",
"m_DefaultReferenceName": "_UV",
"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": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "21ba980160754584983d206639aa661e",
"m_Id": 3,
"m_DisplayName": "PositionWS",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "PositionWS",
"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": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "32888c42b68046e598934534dc363636",
"m_Id": 0,
"m_DisplayName": "UV",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
"m_ObjectId": "351c706bfb6b4a2ab243a648fa5d12fa",
"m_Guid": {
"m_GuidSerialized": "5565f1fc-b268-41d0-9471-d967aebb7ddc"
},
"m_Name": "Depth",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "Depth",
"m_DefaultReferenceName": "_Depth",
"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": 0.0,
"m_FloatType": 0,
"m_RangeValues": {
"x": 0.0,
"y": 1.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "4596ee9afe7a4377a2d718ea83de035e",
"m_Id": 1,
"m_DisplayName": "depth",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "depth",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "5594f2633b7348c5a865cc1ae767f5e6",
"m_Id": 0,
"m_DisplayName": "UV",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "UV",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Matrix4MaterialSlot",
"m_ObjectId": "644b727c1ef047d8b0afa7256b6db1b2",
"m_Id": 0,
"m_DisplayName": "_InverseViewProjection",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"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_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.CategoryData",
"m_ObjectId": "84feca52a05a4342ac915d4ada6ab344",
"m_Name": "",
"m_ChildObjectList": [
{
"m_Id": "173f8d8c3d5f48e58358e9bc8a6718d9"
},
{
"m_Id": "351c706bfb6b4a2ab243a648fa5d12fa"
},
{
"m_Id": "f4801762327f410b854ba9c13cebfcde"
}
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "85adc10f59034083a0358eccdfe6b8a4",
"m_Id": 0,
"m_DisplayName": "Depth",
"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.Vector3MaterialSlot",
"m_ObjectId": "a30ae2a8e1dc45eab3373720e3ca914f",
"m_Id": 1,
"m_DisplayName": "Position",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Position",
"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": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "a4d0462fcb5f45cc8ec9e85d3828575f",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -741.0,
"y": -668.0,
"width": 107.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "85adc10f59034083a0358eccdfe6b8a4"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Property": {
"m_Id": "351c706bfb6b4a2ab243a648fa5d12fa"
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode",
"m_ObjectId": "c4af25c4e3784944aa9d1ab0ee575ad6",
"m_Group": {
"m_Id": ""
},
"m_Name": "Output",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -266.0000305175781,
"y": -744.9999389648438,
"width": 97.00001525878906,
"height": 77.0
}
},
"m_Slots": [
{
"m_Id": "a30ae2a8e1dc45eab3373720e3ca914f"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"IsFirstSlotValid": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Matrix4MaterialSlot",
"m_ObjectId": "f367a0b113ca4b2691d186fc429d6688",
"m_Id": 2,
"m_DisplayName": "_matrix",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "_matrix",
"m_StageCapability": 3,
"m_Value": {
"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_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": 1,
"m_Type": "UnityEditor.ShaderGraph.Matrix4ShaderProperty",
"m_ObjectId": "f4801762327f410b854ba9c13cebfcde",
"m_Guid": {
"m_GuidSerialized": "c414ac1b-5a32-4b59-9659-a3b6713dcccf"
},
"m_Name": "_InverseViewProjection",
"m_DefaultRefNameVersion": 1,
"m_RefNameGeneratedByDisplayName": "_InverseViewProjection",
"m_DefaultReferenceName": "_InverseViewProjection",
"m_OverrideReferenceName": "",
"m_GeneratePropertyBlock": false,
"m_UseCustomSlotLabel": false,
"m_CustomSlotLabel": "",
"m_DismissedVersion": 0,
"m_Precision": 0,
"overrideHLSLDeclaration": true,
"hlslDeclarationOverride": 2,
"m_Hidden": false,
"m_Value": {
"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
}
}