fix: Fog masking

This commit is contained in:
Alexandre Coirier
2026-05-29 15:24:31 +02:00
parent 5611574882
commit aa82cacd5c
8 changed files with 1586 additions and 299 deletions
@@ -215,6 +215,9 @@
},
{
"m_Id": "aed770d7b8364459a7bfdfc34cbd2ab8"
},
{
"m_Id": "2f58e7c00b5c4814b4a3d8c13322694d"
}
],
"m_GroupDatas": [],
@@ -271,11 +274,39 @@
},
"m_InputSlot": {
"m_Node": {
"m_Id": "c5d342277052409f87283f2c60ccf3a1"
"m_Id": "2f58e7c00b5c4814b4a3d8c13322694d"
},
"m_SlotId": 13
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "2f58e7c00b5c4814b4a3d8c13322694d"
},
"m_SlotId": 15
},
"m_InputSlot": {
"m_Node": {
"m_Id": "1035dda04278422b988336d6984e2045"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "3e46eb76f3e94a73912aecb313b485e5"
},
"m_SlotId": 0
},
"m_InputSlot": {
"m_Node": {
"m_Id": "2f58e7c00b5c4814b4a3d8c13322694d"
},
"m_SlotId": 18
}
},
{
"m_OutputSlot": {
"m_Node": {
@@ -383,7 +414,7 @@
},
"m_InputSlot": {
"m_Node": {
"m_Id": "c5d342277052409f87283f2c60ccf3a1"
"m_Id": "2f58e7c00b5c4814b4a3d8c13322694d"
},
"m_SlotId": 16
}
@@ -397,7 +428,7 @@
},
"m_InputSlot": {
"m_Node": {
"m_Id": "c5d342277052409f87283f2c60ccf3a1"
"m_Id": "2f58e7c00b5c4814b4a3d8c13322694d"
},
"m_SlotId": 17
}
@@ -481,7 +512,7 @@
},
"m_InputSlot": {
"m_Node": {
"m_Id": "c5d342277052409f87283f2c60ccf3a1"
"m_Id": "2f58e7c00b5c4814b4a3d8c13322694d"
},
"m_SlotId": 14
}
@@ -528,20 +559,6 @@
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "c5d342277052409f87283f2c60ccf3a1"
},
"m_SlotId": 15
},
"m_InputSlot": {
"m_Node": {
"m_Id": "1035dda04278422b988336d6984e2045"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
@@ -836,6 +853,22 @@
"m_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "04f9be2a155a4360a9351c1e284fa94b",
"m_Id": 15,
"m_DisplayName": "Alpha",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Alpha",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [],
"m_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
@@ -1191,9 +1224,9 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 596.0,
"y": 1187.0,
"width": 110.0,
"x": 845.0,
"y": 1202.0,
"width": 116.0,
"height": 34.0
}
},
@@ -1413,6 +1446,62 @@
}
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.CustomFunctionNode",
"m_ObjectId": "2f58e7c00b5c4814b4a3d8c13322694d",
"m_Group": {
"m_Id": ""
},
"m_Name": "Mask (Custom Function)",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 1002.0,
"y": 1119.0,
"width": 185.0,
"height": 190.0
}
},
"m_Slots": [
{
"m_Id": "c0c268cf854445c3a84028f37581f005"
},
{
"m_Id": "edda2fdb41e64d0d963b57e37eb02902"
},
{
"m_Id": "fafb345f71e44af2a725314204a0d6aa"
},
{
"m_Id": "945c2be648d84367930876227e5c006c"
},
{
"m_Id": "84e8c256f41d4dc5be903041907679c3"
},
{
"m_Id": "04f9be2a155a4360a9351c1e284fa94b"
}
],
"synonyms": [
"code",
"HLSL"
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SourceType": 0,
"m_FunctionName": "Mask",
"m_FunctionSource": "2f64e213049952b44ac4bed6f62cafda",
"m_FunctionSourceUsePragmas": true,
"m_FunctionBody": "Enter function body here..."
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
@@ -1580,7 +1669,7 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 411.0,
"x": 410.0,
"y": 443.0,
"width": 206.0,
"height": 130.0
@@ -1803,22 +1892,6 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "45ccaed6d4d547b090b274a4421169f6",
"m_Id": 15,
"m_DisplayName": "Alpha",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Alpha",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [],
"m_LiteralMode": false
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Matrix4ShaderProperty",
@@ -2674,8 +2747,8 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 595.9999389648438,
"y": 1220.9998779296875,
"x": 845.0,
"y": 1236.0,
"width": 115.0,
"height": 34.0
}
@@ -2825,8 +2898,8 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 594.9999389648438,
"y": 1254.9998779296875,
"x": 844.0,
"y": 1270.0,
"width": 116.0,
"height": 34.0
}
@@ -2977,6 +3050,54 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Matrix4MaterialSlot",
"m_ObjectId": "84e8c256f41d4dc5be903041907679c3",
"m_Id": 17,
"m_DisplayName": "Mask2",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Mask2",
"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.MultiplyNode",
@@ -3034,22 +3155,6 @@
"m_DefaultValue": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "8892c2b112c14c028eddce5e899710b2",
"m_Id": 14,
"m_DisplayName": "MaskID",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "MaskID",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [],
"m_LiteralMode": false
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Internal.Vector1ShaderProperty",
@@ -3312,7 +3417,7 @@
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Matrix4MaterialSlot",
"m_ObjectId": "92ea1472d59d4857abd59195ace147a4",
"m_ObjectId": "945c2be648d84367930876227e5c006c",
"m_Id": 16,
"m_DisplayName": "Mask1",
"m_SlotType": 0,
@@ -3616,54 +3721,6 @@
"m_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Matrix4MaterialSlot",
"m_ObjectId": "a363c8f5686c459792f7e2c53fb8dc8a",
"m_Id": 17,
"m_DisplayName": "Mask2",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Mask2",
"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.PropertyNode",
@@ -3762,8 +3819,8 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 592.0,
"y": 1153.0,
"x": 841.0,
"y": 1168.0,
"width": 114.0,
"height": 34.0
}
@@ -3945,6 +4002,29 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",
"m_ObjectId": "c0c268cf854445c3a84028f37581f005",
"m_Id": 18,
"m_DisplayName": "New",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "New",
"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": 1,
"m_Type": "UnityEditor.ShaderGraph.Matrix4ShaderProperty",
@@ -4106,23 +4186,8 @@
{
"m_Id": "8c26652d47d64417a9ce7a93bb811466"
},
{
"m_Id": "8892c2b112c14c028eddce5e899710b2"
},
{
"m_Id": "fdc7026b3c2f43f9af9342c37132e6cc"
},
{
"m_Id": "92ea1472d59d4857abd59195ace147a4"
},
{
"m_Id": "a363c8f5686c459792f7e2c53fb8dc8a"
},
{
"m_Id": "8ead54ba7a8d487ea3f55e930101215f"
},
{
"m_Id": "45ccaed6d4d547b090b274a4421169f6"
}
],
"synonyms": [
@@ -4837,6 +4902,22 @@
"m_Space": 2
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "edda2fdb41e64d0d963b57e37eb02902",
"m_Id": 14,
"m_DisplayName": "MaskID",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "MaskID",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [],
"m_LiteralMode": false
}
{
"m_SGVersion": 1,
"m_Type": "UnityEditor.ShaderGraph.Matrix4ShaderProperty",
@@ -5072,34 +5153,10 @@
"m_ColorMode": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot",
"m_ObjectId": "fb84ed33198947c792183c161d398299",
"m_Id": 0,
"m_DisplayName": "Position",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Position",
"m_StageCapability": 1,
"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_Space": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Matrix4MaterialSlot",
"m_ObjectId": "fdc7026b3c2f43f9af9342c37132e6cc",
"m_ObjectId": "fafb345f71e44af2a725314204a0d6aa",
"m_Id": 13,
"m_DisplayName": "Mask0",
"m_SlotType": 0,
@@ -5144,6 +5201,30 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.PositionMaterialSlot",
"m_ObjectId": "fb84ed33198947c792183c161d398299",
"m_Id": 0,
"m_DisplayName": "Position",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Position",
"m_StageCapability": 1,
"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_Space": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector3MaterialSlot",