Skip to content
Snippets Groups Projects
Commit 3746d234 authored by Adam Elfawal's avatar Adam Elfawal
Browse files

Dithering works with the camera

Add dithering script to an object to have it work
parent 210a4348
No related branches found
No related tags found
No related merge requests found
......@@ -78,9 +78,6 @@
{
"m_Id": "b04505ff9aff455abd053e7cdb45fb27"
},
{
"m_Id": "acaf3f9596db4b419316345b9cb63890"
},
{
"m_Id": "6a75e0ebf04f4b1d8a62da2358901c18"
},
......@@ -101,6 +98,39 @@
},
{
"m_Id": "54511dcc6b714592b3fc99912bef9ab8"
},
{
"m_Id": "26332cb5c29b4fe0bc962e3f3c99f798"
},
{
"m_Id": "da750dcbabb24403b3809b3263f3be67"
},
{
"m_Id": "66353fc304cc4cfcb7d2c2d00995e0ae"
},
{
"m_Id": "9f768d529815437098a24d07b50d200b"
},
{
"m_Id": "6c7480faa4fb4804a456dcf68a473b0e"
},
{
"m_Id": "705d71632c824bcb886b0721ce5ccc59"
},
{
"m_Id": "0ea133e5adc3435ea27017124475bb68"
},
{
"m_Id": "28ca280435184cfdae8896e90f80560d"
},
{
"m_Id": "be5a33167e8446d788b0f34aa5abf61b"
},
{
"m_Id": "bc389fc10fc0461293577f9152a939df"
},
{
"m_Id": "29aedf3fff7447ebb750e485eb678fde"
}
],
"m_GroupDatas": [],
......@@ -120,6 +150,34 @@
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "0ea133e5adc3435ea27017124475bb68"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "be5a33167e8446d788b0f34aa5abf61b"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "26332cb5c29b4fe0bc962e3f3c99f798"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "66353fc304cc4cfcb7d2c2d00995e0ae"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
......@@ -134,6 +192,20 @@
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "28ca280435184cfdae8896e90f80560d"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "be5a33167e8446d788b0f34aa5abf61b"
},
"m_SlotId": 2
}
},
{
"m_OutputSlot": {
"m_Node": {
......@@ -199,9 +271,9 @@
},
"m_InputSlot": {
"m_Node": {
"m_Id": "acaf3f9596db4b419316345b9cb63890"
"m_Id": "ce0f25c9fd6340079e957e6356f9a786"
},
"m_SlotId": 1
"m_SlotId": 0
}
},
{
......@@ -221,13 +293,27 @@
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "75916d331b674699a99833be790641bd"
"m_Id": "6c7480faa4fb4804a456dcf68a473b0e"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "677abad987934883b7d25a6a90e16240"
"m_Id": "705d71632c824bcb886b0721ce5ccc59"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "705d71632c824bcb886b0721ce5ccc59"
},
"m_SlotId": 2
},
"m_InputSlot": {
"m_Node": {
"m_Id": "29aedf3fff7447ebb750e485eb678fde"
},
"m_SlotId": 0
}
......@@ -235,13 +321,13 @@
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "acaf3f9596db4b419316345b9cb63890"
"m_Id": "705d71632c824bcb886b0721ce5ccc59"
},
"m_SlotId": 2
},
"m_InputSlot": {
"m_Node": {
"m_Id": "ce0f25c9fd6340079e957e6356f9a786"
"m_Id": "bc389fc10fc0461293577f9152a939df"
},
"m_SlotId": 0
}
......@@ -249,13 +335,27 @@
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "b04505ff9aff455abd053e7cdb45fb27"
"m_Id": "75916d331b674699a99833be790641bd"
},
"m_SlotId": 4
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "677abad987934883b7d25a6a90e16240"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "9f768d529815437098a24d07b50d200b"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "acaf3f9596db4b419316345b9cb63890"
"m_Id": "705d71632c824bcb886b0721ce5ccc59"
},
"m_SlotId": 0
}
......@@ -274,6 +374,34 @@
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "be5a33167e8446d788b0f34aa5abf61b"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "bc389fc10fc0461293577f9152a939df"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "da750dcbabb24403b3809b3263f3be67"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "66353fc304cc4cfcb7d2c2d00995e0ae"
},
"m_SlotId": 1
}
},
{
"m_OutputSlot": {
"m_Node": {
......@@ -291,8 +419,8 @@
],
"m_VertexContext": {
"m_Position": {
"x": 1127.0,
"y": 69.0
"x": 2182.999755859375,
"y": -68.99998474121094
},
"m_Blocks": [
{
......@@ -308,8 +436,8 @@
},
"m_FragmentContext": {
"m_Position": {
"x": 1127.0,
"y": 269.0
"x": 2182.999755859375,
"y": 130.99998474121095
},
"m_Blocks": [
{
......@@ -569,6 +697,72 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1Node",
"m_ObjectId": "0ea133e5adc3435ea27017124475bb68",
"m_Group": {
"m_Id": ""
},
"m_Name": "Float",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1849.3260498046875,
"y": 1623.0147705078125,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "efd7a0b3f0f44f189ffcb6be26891323"
},
{
"m_Id": "c249809ffd494e76ab7c3b1fb8dcbcbc"
}
],
"synonyms": [
"Vector 1",
"1",
"v1",
"vec1",
"scalar"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Value": 0.0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "10bee8d27e4c48988ee8a7c3c3dd3dbf",
"m_Id": 3,
"m_DisplayName": "World Bounds Max",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "World Bounds Max",
"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.Vector1MaterialSlot",
......@@ -584,6 +778,42 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "134050d8ca864134a1395997c4bdc1f6",
"m_Id": 5,
"m_DisplayName": "Z Buffer Sign",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Z Buffer Sign",
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "13443aefabc6466985b86816c1c80896",
"m_Id": 1,
"m_DisplayName": "In Min Max",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "InMinMax",
"m_StageCapability": 3,
"m_Value": {
"x": -1.0,
"y": 1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Internal.Texture2DShaderProperty",
......@@ -614,6 +844,29 @@
"m_DefaultType": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "183b7226e32d4a73a0d159147c15d164",
"m_Id": 2,
"m_DisplayName": "World Bounds Min",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "World Bounds Min",
"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.Vector4MaterialSlot",
......@@ -670,12 +923,12 @@
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "2522051adcfe4e388947f16703be8f13",
"m_Id": 0,
"m_DisplayName": "Dither Size",
"m_ObjectId": "1e8711cbf5e94ae081ea0933a141272e",
"m_Id": 2,
"m_DisplayName": "Orthographic",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_ShaderOutputName": "Orthographic",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
......@@ -684,31 +937,158 @@
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "28120d608435475694aece7654350a0d",
"m_Group": {
"m_Id": ""
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "2482eaabc1cd454c87436e97ab7d7027",
"m_Id": 0,
"m_DisplayName": "Position",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Position",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 248.0,
"y": 547.0,
"width": 123.0,
"height": 34.0
}
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Slots": [
{
"m_Id": "196774757bcc46b9b41e1774d614dfd9"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "250f1805f8204ea9ae906457337c53f1",
"m_Id": 0,
"m_DisplayName": "In",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "In",
"m_StageCapability": 3,
"m_Value": {
"x": 1.0,
"y": 1.0,
"z": 1.0,
"w": 1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "2522051adcfe4e388947f16703be8f13",
"m_Id": 0,
"m_DisplayName": "Dither Size",
"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.ObjectNode",
"m_ObjectId": "26332cb5c29b4fe0bc962e3f3c99f798",
"m_Group": {
"m_Id": ""
},
"m_Name": "Object",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 782.0,
"y": 988.9999389648438,
"width": 152.99993896484376,
"height": 173.00006103515626
}
},
"m_Slots": [
{
"m_Id": "7e2a8ef52913414b995b6f463f250218"
},
{
"m_Id": "76fa860df7a54710bfb89b4618c4a652"
},
{
"m_Id": "899de59416364b118912985079d14e4d"
},
{
"m_Id": "9d67265df172416d9a003f7518f2b672"
},
{
"m_Id": "7a3a0fb5b1264f198d2ade5a8e400a8c"
}
],
"synonyms": [
"position",
"scale",
"bounds",
"size"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "2650b520baf4439eb8b1e30fac7e59c9",
"m_Id": 6,
"m_DisplayName": "Width",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Width",
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PropertyNode",
"m_ObjectId": "28120d608435475694aece7654350a0d",
"m_Group": {
"m_Id": ""
},
"m_Name": "Property",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 248.0,
"y": 547.0,
"width": 123.0,
"height": 34.0
}
},
"m_Slots": [
{
"m_Id": "196774757bcc46b9b41e1774d614dfd9"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
......@@ -718,6 +1098,110 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "285355c77f2a4921abd5d0e7c1c022c6",
"m_Id": 2,
"m_DisplayName": "Out Min Max",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "OutMinMax",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
"y": 1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1Node",
"m_ObjectId": "28ca280435184cfdae8896e90f80560d",
"m_Group": {
"m_Id": ""
},
"m_Name": "Float",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1818.908447265625,
"y": 1714.2672119140625,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "6c98d0ec4ddc47b383553d88a06ce22e"
},
{
"m_Id": "7b5f5acf7c8448b48e4a58670fccc575"
}
],
"synonyms": [
"Vector 1",
"1",
"v1",
"vec1",
"scalar"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Value": 0.0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.OneMinusNode",
"m_ObjectId": "29aedf3fff7447ebb750e485eb678fde",
"m_Group": {
"m_Id": ""
},
"m_Name": "One Minus",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1802.0001220703125,
"y": 999.0,
"width": 208.0,
"height": 278.0
}
},
"m_Slots": [
{
"m_Id": "250f1805f8204ea9ae906457337c53f1"
},
{
"m_Id": "b42a755db6a34e9198e07871e8335b00"
}
],
"synonyms": [
"complement",
"invert",
"opposite"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DitherNode",
......@@ -785,6 +1269,21 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "2d9508b40c5f43e89970518e9c04d63b",
"m_Id": 7,
"m_DisplayName": "Height",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Height",
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
......@@ -809,6 +1308,21 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "31e9d7cd819842adb554c03439d9128a",
"m_Id": 3,
"m_DisplayName": "Near Plane",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Near Plane",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.Rendering.Universal.ShaderGraph.UniversalLitSubTarget",
......@@ -843,6 +1357,21 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "34f627aa72804dbf9afba9a8743a9fd9",
"m_Id": 6,
"m_DisplayName": "Width",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Width",
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
......@@ -888,54 +1417,6 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
"m_ObjectId": "403d7ed3cf824770b9565e51daf89843",
"m_Id": 0,
"m_DisplayName": "A",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "A",
"m_StageCapability": 3,
"m_Value": {
"e00": 0.0,
"e01": 0.0,
"e02": 0.0,
"e03": 0.0,
"e10": 0.0,
"e11": 0.0,
"e12": 0.0,
"e13": 0.0,
"e20": 0.0,
"e21": 0.0,
"e22": 0.0,
"e23": 0.0,
"e30": 0.0,
"e31": 0.0,
"e32": 0.0,
"e33": 0.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.Internal.Texture2DShaderProperty",
......@@ -991,6 +1472,30 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "501405240e3f4dd3a7c6138cb82e79b8",
"m_Id": 1,
"m_DisplayName": "B",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "B",
"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_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
......@@ -1171,6 +1676,21 @@
"m_DefaultType": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "5d9acf15a0414b34808b78fe5705c74c",
"m_Id": 7,
"m_DisplayName": "Height",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Height",
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
......@@ -1239,6 +1759,44 @@
"m_SerializedDescriptor": "SurfaceDescription.BaseColor"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "6351a12e1844460088ed040e59d8cd18",
"m_Id": 0,
"m_DisplayName": "Position",
"m_SlotType": 1,
"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.Vector1MaterialSlot",
"m_ObjectId": "63fc6017a8f54e779e56c59b0d363941",
"m_Id": 3,
"m_DisplayName": "Near Plane",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Near Plane",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DivideNode",
......@@ -1281,6 +1839,69 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DistanceNode",
"m_ObjectId": "66353fc304cc4cfcb7d2c2d00995e0ae",
"m_Group": {
"m_Id": ""
},
"m_Name": "Distance",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1113.9998779296875,
"y": 1034.0,
"width": 208.0001220703125,
"height": 301.9998779296875
}
},
"m_Slots": [
{
"m_Id": "e9e8b7b6aa6a4d388fed446c316e8512"
},
{
"m_Id": "a0591fa1281d444998e5f9a3b347a630"
},
{
"m_Id": "9a2ef919b27640c897a2d97a3f028195"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "664954d565f341d2831ed1e39a780b4d",
"m_Id": 0,
"m_DisplayName": "A",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "A",
"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_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.MultiplyNode",
......@@ -1324,6 +1945,29 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "69883b50021d411c978286cd634bd4c6",
"m_Id": 4,
"m_DisplayName": "Bounds Size",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Bounds Size",
"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",
......@@ -1396,6 +2040,83 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CameraNode",
"m_ObjectId": "6c7480faa4fb4804a456dcf68a473b0e",
"m_Group": {
"m_Id": ""
},
"m_Name": "Camera",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1272.9361572265625,
"y": 1516.789794921875,
"width": 121.99993896484375,
"height": 245.000244140625
}
},
"m_Slots": [
{
"m_Id": "ebee88e44bda4007a5ff3cc02e8fa031"
},
{
"m_Id": "c72137ce548d4aa7bf72e25eb451d5f1"
},
{
"m_Id": "1e8711cbf5e94ae081ea0933a141272e"
},
{
"m_Id": "63fc6017a8f54e779e56c59b0d363941"
},
{
"m_Id": "e33209fb85e34bdf972c95c6403a4ae7"
},
{
"m_Id": "cfae1c8178734b3ea772483d1d38e1a5"
},
{
"m_Id": "2650b520baf4439eb8b1e30fac7e59c9"
},
{
"m_Id": "5d9acf15a0414b34808b78fe5705c74c"
}
],
"synonyms": [
"position",
"direction",
"orthographic",
"near plane",
"far plane",
"width",
"height"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "6c98d0ec4ddc47b383553d88a06ce22e",
"m_Id": 1,
"m_DisplayName": "X",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "X",
"m_StageCapability": 3,
"m_Value": 0.5,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector4MaterialSlot",
......@@ -1421,6 +2142,45 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DistanceNode",
"m_ObjectId": "705d71632c824bcb886b0721ce5ccc59",
"m_Group": {
"m_Id": ""
},
"m_Name": "Distance",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1659.93603515625,
"y": 1292.7899169921875,
"width": 208.0001220703125,
"height": 301.9998779296875
}
},
"m_Slots": [
{
"m_Id": "664954d565f341d2831ed1e39a780b4d"
},
{
"m_Id": "501405240e3f4dd3a7c6138cb82e79b8"
},
{
"m_Id": "968b4bf498884b6595d4216500524b49"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
......@@ -1502,6 +2262,67 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "76fa860df7a54710bfb89b4618c4a652",
"m_Id": 1,
"m_DisplayName": "Scale",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Scale",
"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.Vector3MaterialSlot",
"m_ObjectId": "7a3a0fb5b1264f198d2ade5a8e400a8c",
"m_Id": 4,
"m_DisplayName": "Bounds Size",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Bounds Size",
"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.Vector1MaterialSlot",
"m_ObjectId": "7b5f5acf7c8448b48e4a58670fccc575",
"m_Id": 0,
"m_DisplayName": "Out",
"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.DynamicVectorMaterialSlot",
......@@ -1550,6 +2371,29 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "7e2a8ef52913414b995b6f463f250218",
"m_Id": 0,
"m_DisplayName": "Position",
"m_SlotType": 1,
"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.ColorRGBMaterialSlot",
......@@ -1580,6 +2424,53 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "8193e2a012a641dfa1efd87c11cb564b",
"m_Id": 0,
"m_DisplayName": "In",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "In",
"m_StageCapability": 3,
"m_Value": {
"x": -1.0,
"y": -1.0,
"z": -1.0,
"w": -1.0
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "899de59416364b118912985079d14e4d",
"m_Id": 2,
"m_DisplayName": "World Bounds Min",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "World Bounds Min",
"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.Texture2DInputMaterialSlot",
......@@ -1630,61 +2521,155 @@
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
"m_ObjectId": "96d292215916435d867398d799b81ade",
"m_Id": 2,
"m_DisplayName": "Out",
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "968b4bf498884b6595d4216500524b49",
"m_Id": 2,
"m_DisplayName": "Out",
"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.Vector1MaterialSlot",
"m_ObjectId": "973cec6b503f4b17a65b08668281df85",
"m_Id": 2,
"m_DisplayName": "Orthographic",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Orthographic",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "9a2ef919b27640c897a2d97a3f028195",
"m_Id": 2,
"m_DisplayName": "Out",
"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.DynamicVectorMaterialSlot",
"m_ObjectId": "9bb8102b2cf84a6ca63e19a8f77fc77e",
"m_Id": 0,
"m_DisplayName": "A",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "A",
"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_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "9d67265df172416d9a003f7518f2b672",
"m_Id": 3,
"m_DisplayName": "World Bounds Max",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Out",
"m_ShaderOutputName": "World Bounds Max",
"m_StageCapability": 3,
"m_Value": {
"e00": 0.0,
"e01": 0.0,
"e02": 0.0,
"e03": 0.0,
"e10": 0.0,
"e11": 0.0,
"e12": 0.0,
"e13": 0.0,
"e20": 0.0,
"e21": 0.0,
"e22": 0.0,
"e23": 0.0,
"e30": 0.0,
"e31": 0.0,
"e32": 0.0,
"e33": 0.0
"x": 0.0,
"y": 0.0,
"z": 0.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
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ObjectNode",
"m_ObjectId": "9f768d529815437098a24d07b50d200b",
"m_Group": {
"m_Id": ""
},
"m_Name": "Object",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1327.9361572265625,
"y": 1247.789794921875,
"width": 152.99993896484376,
"height": 173.00006103515626
}
},
"m_Slots": [
{
"m_Id": "6351a12e1844460088ed040e59d8cd18"
},
{
"m_Id": "dd49b6a2bfef49f3a8e21d820f166e1e"
},
{
"m_Id": "183b7226e32d4a73a0d159147c15d164"
},
{
"m_Id": "10bee8d27e4c48988ee8a7c3c3dd3dbf"
},
{
"m_Id": "69883b50021d411c978286cd634bd4c6"
}
],
"synonyms": [
"position",
"scale",
"bounds",
"size"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "9bb8102b2cf84a6ca63e19a8f77fc77e",
"m_Id": 0,
"m_DisplayName": "A",
"m_ObjectId": "a0591fa1281d444998e5f9a3b347a630",
"m_Id": 1,
"m_DisplayName": "B",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "A",
"m_ShaderOutputName": "B",
"m_StageCapability": 3,
"m_Value": {
"x": 0.0,
......@@ -1776,49 +2761,6 @@
"m_SupportVFX": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.MultiplyNode",
"m_ObjectId": "acaf3f9596db4b419316345b9cb63890",
"m_Group": {
"m_Id": ""
},
"m_Name": "Multiply",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 727.0,
"y": -306.0,
"width": 208.0,
"height": 302.0
}
},
"m_Slots": [
{
"m_Id": "403d7ed3cf824770b9565e51daf89843"
},
{
"m_Id": "f640524a668a4678b3d4073cb43e4722"
},
{
"m_Id": "96d292215916435d867398d799b81ade"
}
],
"synonyms": [
"multiplication",
"times",
"x"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Texture2DMaterialSlot",
......@@ -1929,6 +2871,117 @@
"m_Space": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "b42a755db6a34e9198e07871e8335b00",
"m_Id": 1,
"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_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "baae0f94695a48bab641cbe6cf4c6d60",
"m_Id": 3,
"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_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.RemapNode",
"m_ObjectId": "bc389fc10fc0461293577f9152a939df",
"m_Group": {
"m_Id": ""
},
"m_Name": "Remap",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 2043.9361572265625,
"y": 1247.7899169921875,
"width": 207.9998779296875,
"height": 326.0
}
},
"m_Slots": [
{
"m_Id": "8193e2a012a641dfa1efd87c11cb564b"
},
{
"m_Id": "13443aefabc6466985b86816c1c80896"
},
{
"m_Id": "285355c77f2a4921abd5d0e7c1c022c6"
},
{
"m_Id": "baae0f94695a48bab641cbe6cf4c6d60"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2MaterialSlot",
"m_ObjectId": "bcd23d6a77ab467e95fb03172aa94458",
"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
},
"m_DefaultValue": {
"x": 0.0,
"y": 0.0
},
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ScreenPositionNode",
......@@ -1997,6 +3050,54 @@
"m_SerializedDescriptor": "SurfaceDescription.Emission"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector2Node",
"m_ObjectId": "be5a33167e8446d788b0f34aa5abf61b",
"m_Group": {
"m_Id": ""
},
"m_Name": "Vector 2",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 2123.93603515625,
"y": 1656.789794921875,
"width": 127.9998779296875,
"height": 101.0001220703125
}
},
"m_Slots": [
{
"m_Id": "c439ae3fd94e4a3c9c060239e3036c0f"
},
{
"m_Id": "ec2f28b816e640589a38b4ca54ebe943"
},
{
"m_Id": "bcd23d6a77ab467e95fb03172aa94458"
}
],
"synonyms": [
"2",
"v2",
"vec2",
"float2"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Value": {
"x": 0.0,
"y": 0.0
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
......@@ -2045,6 +3146,59 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "c249809ffd494e76ab7c3b1fb8dcbcbc",
"m_Id": 0,
"m_DisplayName": "Out",
"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.Vector1MaterialSlot",
"m_ObjectId": "c439ae3fd94e4a3c9c060239e3036c0f",
"m_Id": 1,
"m_DisplayName": "X",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "X",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "c72137ce548d4aa7bf72e25eb451d5f1",
"m_Id": 1,
"m_DisplayName": "Direction",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Direction",
"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.BlockNode",
......@@ -2079,6 +3233,21 @@
"m_SerializedDescriptor": "SurfaceDescription.Alpha"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "cfae1c8178734b3ea772483d1d38e1a5",
"m_Id": 5,
"m_DisplayName": "Z Buffer Sign",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Z Buffer Sign",
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
......@@ -2176,6 +3345,68 @@
"m_Space": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CameraNode",
"m_ObjectId": "da750dcbabb24403b3809b3263f3be67",
"m_Group": {
"m_Id": ""
},
"m_Name": "Camera",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 727.0,
"y": 1257.9998779296875,
"width": 121.99993896484375,
"height": 245.000244140625
}
},
"m_Slots": [
{
"m_Id": "2482eaabc1cd454c87436e97ab7d7027"
},
{
"m_Id": "f5716ea44c0a4567af8ff22e828ad7e2"
},
{
"m_Id": "973cec6b503f4b17a65b08668281df85"
},
{
"m_Id": "31e9d7cd819842adb554c03439d9128a"
},
{
"m_Id": "eee2f47d93e6414487bacaec8912f166"
},
{
"m_Id": "134050d8ca864134a1395997c4bdc1f6"
},
{
"m_Id": "34f627aa72804dbf9afba9a8743a9fd9"
},
{
"m_Id": "2d9508b40c5f43e89970518e9c04d63b"
}
],
"synonyms": [
"position",
"direction",
"orthographic",
"near plane",
"far plane",
"width",
"height"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
......@@ -2191,6 +3422,29 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "dd49b6a2bfef49f3a8e21d820f166e1e",
"m_Id": 1,
"m_DisplayName": "Scale",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Scale",
"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.BlockNode",
......@@ -2273,6 +3527,21 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "e33209fb85e34bdf972c95c6403a4ae7",
"m_Id": 4,
"m_DisplayName": "Far Plane",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Far Plane",
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
......@@ -2341,6 +3610,100 @@
"m_SerializedDescriptor": "SurfaceDescription.NormalTS"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "e9e8b7b6aa6a4d388fed446c316e8512",
"m_Id": 0,
"m_DisplayName": "A",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "A",
"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_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "ebee88e44bda4007a5ff3cc02e8fa031",
"m_Id": 0,
"m_DisplayName": "Position",
"m_SlotType": 1,
"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.Vector1MaterialSlot",
"m_ObjectId": "ec2f28b816e640589a38b4ca54ebe943",
"m_Id": 2,
"m_DisplayName": "Y",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Y",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [
"Y"
]
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "eee2f47d93e6414487bacaec8912f166",
"m_Id": 4,
"m_DisplayName": "Far Plane",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Far Plane",
"m_StageCapability": 3,
"m_Value": 1.0,
"m_DefaultValue": 1.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "efd7a0b3f0f44f189ffcb6be26891323",
"m_Id": 1,
"m_DisplayName": "X",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "X",
"m_StageCapability": 3,
"m_Value": 2.0,
"m_DefaultValue": 0.0,
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
......@@ -2392,50 +3755,25 @@
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicValueMaterialSlot",
"m_ObjectId": "f640524a668a4678b3d4073cb43e4722",
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "f5716ea44c0a4567af8ff22e828ad7e2",
"m_Id": 1,
"m_DisplayName": "B",
"m_SlotType": 0,
"m_DisplayName": "Direction",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "B",
"m_ShaderOutputName": "Direction",
"m_StageCapability": 3,
"m_Value": {
"e00": 2.0,
"e01": 2.0,
"e02": 2.0,
"e03": 2.0,
"e10": 2.0,
"e11": 2.0,
"e12": 2.0,
"e13": 2.0,
"e20": 2.0,
"e21": 2.0,
"e22": 2.0,
"e23": 2.0,
"e30": 2.0,
"e31": 2.0,
"e32": 2.0,
"e33": 2.0
"x": 0.0,
"y": 0.0,
"z": 0.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
}
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"m_Labels": []
}
{
......
......@@ -21,7 +21,7 @@ Material:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: obstacle
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Shader: {fileID: -6465566751694194690, guid: e8dad23043d60d548a600d3f26dcf6f0, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
......@@ -30,13 +30,16 @@ Material:
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _Albedo_Texture:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
......@@ -65,10 +68,18 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Metallic:
m_Texture: {fileID: 0}
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}
- _Normal:
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}
......@@ -106,6 +117,7 @@ Material:
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _Dither_Size: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
......@@ -115,7 +127,9 @@ Material:
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Opacity: 1
- _Parallax: 0.02
- _QueueControl: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
......@@ -128,8 +142,10 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _AlbedoColor: {r: 0, g: 0, b: 0, a: 0}
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
- _Color: {r: 0, g: 0, b: 0, a: 1}
- _Emission: {r: 0, g: 0, b: 0, a: 0}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
This diff is collapsed.
fileFormatVersion: 2
guid: edaba4a29b950bd4fbc0ab945dc260f4
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Dithering : MonoBehaviour
{
public Material mat;
// Start is called before the first frame update
void Start()
{
mat = gameObject.GetComponent<Renderer>().material;
}
/// <summary>
/// Changes the Dithering based on how close the object is to the camera
/// The farther the object (and closer to the player) the stronger the dithering
/// </summary>
/// <param name="distance"> distance to object</param>
/// <param name="maxDistance">distance to player</param>
public void SetOpacity(float distance, float distanceToPlayer)
{
float opacity = 0;
opacity = ((distanceToPlayer - distance)/distanceToPlayer);
opacity = 1 - opacity;
mat.SetFloat("_Opacity", opacity);
}
/// <summary>
/// Just resets the opacity
/// </summary>
/// <param name="f">Send a variable to manually set it if you'd rather</param>
public void ResetOpacity(float f = 1)
{
mat.SetFloat("_Opacity", f);
}
}
fileFormatVersion: 2
guid: b27a0bea99c8c21498b314d21a51a657
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameManager : MonoBehaviour
{
// Start is called before the first frame update
void Awake()
{
//To have the dithering work well with reusing materials we need to instance every material
//If we want to change a material and need it to not be instanced I can optimize this in the future, Adam is currently very sleepy
List<GameObject> allObj = GetAllObjectsInScene();
foreach(GameObject GO in allObj)
{
if (GO.GetComponent<Renderer>() != null)
{
Material mat = GO.GetComponent<Renderer>().material;
GO.GetComponent<Renderer>().material = new Material(mat);
}
}
}
/// <summary>
/// Gets all objects in the scene
/// </summary>
/// <returns>A list of all gameobjects</returns>
List<GameObject> GetAllObjectsInScene()
{
List<GameObject> objectsInScene = new List<GameObject>();
foreach (GameObject go in Resources.FindObjectsOfTypeAll(typeof(GameObject)) as GameObject[])
{
if (go.hideFlags == HideFlags.NotEditable || go.hideFlags == HideFlags.HideAndDontSave)
continue;
objectsInScene.Add(go);
}
return objectsInScene;
}
}
fileFormatVersion: 2
guid: 02cacf7946d175940b96eb697f8d7786
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MainCamera : MonoBehaviour
{
public Transform cameraTrans;
public Transform playerTrans;
// Start is called before the first frame update
void Start()
{
cameraTrans = gameObject.GetComponent<Transform>();
}
// Update is called once per frame
void Update()
{
CameraDither();
}
/// <summary>
/// Finds the distance between camera and player then casts a raycast towards the player, if it hits an object with a dithering component it sets the opacity of the texture
/// </summary>
private void CameraDither()
{
float maxDistance = 10;
List<GameObject> ditherObjs = new List<GameObject>();
maxDistance = Vector3.Distance(cameraTrans.position, playerTrans.position);
//Resets the opacity in case its out of range
foreach (GameObject GO in ditherObjs)
{
Dithering dither = GO.GetComponent<Dithering>();
dither.ResetOpacity();
}
Ray ray = new Ray(cameraTrans.position, playerTrans.position - cameraTrans.position);
RaycastHit[] rayhits = Physics.RaycastAll(ray, maxDistance);
Debug.DrawRay(cameraTrans.position, ray.direction, Color.cyan);
foreach (RaycastHit hit in rayhits)
{
Dithering dither = hit.collider.gameObject.GetComponent<Dithering>();
if (dither != null)
{
dither.SetOpacity(hit.distance, maxDistance);
if (!ditherObjs.Contains(hit.collider.gameObject))
{
ditherObjs.Add(dither.gameObject);
}
}
}
}
}
fileFormatVersion: 2
guid: ccadac2e5fe8b0d4b8feaac68da20995
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 53
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: de02f9e1d18f588468e474319d09a723, type: 3}
m_Name:
m_EditorClassIdentifier:
customInterpolatorErrorThreshold: 32
customInterpolatorWarningThreshold: 16
......@@ -15,7 +15,7 @@ TagManager:
- UI
- Player
- Obstacles
-
- Dithering
-
-
-
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment