Files
Bombaleila/Library/PackageCache/com.unity.shadergraph@c8830f61858d/Samples~/CustomLighting/Components/Ambient/Screen Space Ambient Occlusion.shadersubgraph
2026-03-03 00:39:30 +05:00

333 lines
8.2 KiB
Plaintext

{
"m_SGVersion": 3,
"m_Type": "UnityEditor.ShaderGraph.GraphData",
"m_ObjectId": "3c9f3a92432249aa96a90dce45336128",
"m_Properties": [],
"m_Keywords": [],
"m_Dropdowns": [],
"m_CategoryData": [
{
"m_Id": "27505ac8c5814921bee474ae6d4af1fe"
}
],
"m_Nodes": [
{
"m_Id": "f1b6bd3434d4498b85acd0f133d2d277"
},
{
"m_Id": "0f48e52099d04b51a6b1dc52cce50d39"
},
{
"m_Id": "0fdc511287e14fd48ca909caba575383"
}
],
"m_GroupDatas": [],
"m_StickyNoteDatas": [],
"m_Edges": [
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "0f48e52099d04b51a6b1dc52cce50d39"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "f1b6bd3434d4498b85acd0f133d2d277"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "0f48e52099d04b51a6b1dc52cce50d39"
},
"m_SlotId": 1
},
"m_InputSlot": {
"m_Node": {
"m_Id": "f1b6bd3434d4498b85acd0f133d2d277"
},
"m_SlotId": 2
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "0fdc511287e14fd48ca909caba575383"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "0f48e52099d04b51a6b1dc52cce50d39"
},
"m_SlotId": 2
}
}
],
"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": "Lighting/Components/Ambient",
"m_GraphPrecision": 1,
"m_PreviewMode": 2,
"m_OutputNode": {
"m_Id": "f1b6bd3434d4498b85acd0f133d2d277"
},
"m_SubDatas": [],
"m_ActiveTargets": []
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "0f48e52099d04b51a6b1dc52cce50d39",
"m_Group": {
"m_Id": ""
},
"m_Name": "SSAO (Custom Function)",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -402.0,
"y": 0.0,
"width": 378.0,
"height": 120.0
}
},
"m_Slots": [
{
"m_Id": "690e9a551dab456fbcbc778a0ccfcbf4"
},
{
"m_Id": "e501e71319eb496f9333eceb0c13822f"
},
{
"m_Id": "6997c7a1c3934119b792e439d3971aae"
}
],
"synonyms": [
"code",
"HLSL"
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 1,
"m_FunctionName": "SSAO",
"m_FunctionSource": "",
"m_FunctionSourceUsePragmas": true,
"m_FunctionBody": "#if defined(_SCREEN_SPACE_OCCLUSION) && !defined(_SURFACE_TYPE_TRANSPARENT) && !defined(SHADERGRAPH_PREVIEW)\r\n float ssao = saturate(SampleAmbientOcclusion(normalizedScreenSpaceUV) + (1.0 - _AmbientOcclusionParam.x));\r\n indirectAmbientOcclusion = ssao;\r\n directAmbientOcclusion = lerp(half(1.0), ssao, _AmbientOcclusionParam.w);\r\n#else\r\n directAmbientOcclusion = half(1.0);\r\n indirectAmbientOcclusion = half(1.0);\r\n#endif"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ScreenPositionNode",
"m_ObjectId": "0fdc511287e14fd48ca909caba575383",
"m_Group": {
"m_Id": ""
},
"m_Name": "Screen Position",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -549.333251953125,
"y": 0.000021630818082485348,
"width": 147.33328247070313,
"height": 131.99998474121095
}
},
"m_Slots": [
{
"m_Id": "46af1aa2afc64ddcba7b9a73e20a165e"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_ScreenSpaceType": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
"m_ObjectId": "27505ac8c5814921bee474ae6d4af1fe",
"m_Name": "",
"m_ChildObjectList": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
"m_ObjectId": "46af1aa2afc64ddcba7b9a73e20a165e",
"m_Id": 0,
"m_DisplayName": "Out",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "685b6d8f65aa489c9e7be338cd23615f",
"m_Id": 2,
"m_DisplayName": "directAO",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "directAO",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "690e9a551dab456fbcbc778a0ccfcbf4",
"m_Id": 2,
"m_DisplayName": "normalizedScreenSpaceUV",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "normalizedScreenSpaceUV",
"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.Vector1MaterialSlot",
"m_ObjectId": "6997c7a1c3934119b792e439d3971aae",
"m_Id": 1,
"m_DisplayName": "directAmbientOcclusion",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "directAmbientOcclusion",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "e501e71319eb496f9333eceb0c13822f",
"m_Id": 0,
"m_DisplayName": "indirectAmbientOcclusion",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "indirectAmbientOcclusion",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "ed013e50e3c04c53a1745b15669f771d",
"m_Id": 1,
"m_DisplayName": "indirectAO",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "indirectAO",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.SubGraphOutputNode",
"m_ObjectId": "f1b6bd3434d4498b85acd0f133d2d277",
"m_Group": {
"m_Id": ""
},
"m_Name": "Output",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -24.0,
"y": -0.0000038799698813818399,
"width": 109.33332061767578,
"height": 102.66666412353516
}
},
"m_Slots": [
{
"m_Id": "ed013e50e3c04c53a1745b15669f771d"
},
{
"m_Id": "685b6d8f65aa489c9e7be338cd23615f"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"IsFirstSlotValid": true
}