wip: HouseOfLeaves & BodiesInWater Blocking

This commit is contained in:
Alexandre Coirier
2026-05-20 21:39:54 +02:00
parent 85c17e49b5
commit 55e19eb959
32 changed files with 4125 additions and 326 deletions
@@ -117,7 +117,7 @@ Material:
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Progression: 1
- _Progression: 0.5
- _QueueControl: 0
- _QueueOffset: 0
- _ReceiveShadows: 1
@@ -11,7 +11,7 @@ void Sand_float
float3 NormalWS,
out float3 Position,
out float Height,
out float Debug
out float Alpha
)
{
//float t = frac(_Time.y / 20);
@@ -52,6 +52,7 @@ void Sand_float
sandFlow = (sandFlow + floor(t * sandLayers)) / sandLayers;
float sandMask = sandFlow * 1.5 - t * .8 + (sandPatern * 2 - 1) * sandDensity * t * .3;
sandMask *= sandDensity * .7 + .3;
// Test
@@ -72,7 +73,7 @@ void Sand_float
Height = sandMask;
Debug = 1;
Alpha = smoothstep(1, .5, abs(smoothstep(-5, 5, PositionWS.x) * 2 - 1));
//Debug = sandFlow;
}
@@ -59,6 +59,15 @@
},
{
"m_Id": "76578eb7ae67481a8a1080f2813b42ba"
},
{
"m_Id": "35bd1540c2bc4f159f6f4ea7a1a0ebad"
},
{
"m_Id": "10f1ba1ec3654c338ce8962b9e4229ce"
},
{
"m_Id": "f5447a792d5447fe97dbf892f44a53e7"
}
],
"m_GroupDatas": [],
@@ -120,6 +129,20 @@
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "95dd652e6b5a4e098d7354863bde6830"
},
"m_SlotId": 3
},
"m_InputSlot": {
"m_Node": {
"m_Id": "f5447a792d5447fe97dbf892f44a53e7"
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
@@ -161,6 +184,20 @@
},
"m_SlotId": 0
}
},
{
"m_OutputSlot": {
"m_Node": {
"m_Id": "f5447a792d5447fe97dbf892f44a53e7"
},
"m_SlotId": 2
},
"m_InputSlot": {
"m_Node": {
"m_Id": "35bd1540c2bc4f159f6f4ea7a1a0ebad"
},
"m_SlotId": 0
}
}
],
"m_VertexContext": {
@@ -203,6 +240,12 @@
},
{
"m_Id": "5859709eb7bc467c8fa9e45c31af05b4"
},
{
"m_Id": "35bd1540c2bc4f159f6f4ea7a1a0ebad"
},
{
"m_Id": "10f1ba1ec3654c338ce8962b9e4229ce"
}
]
},
@@ -279,6 +322,40 @@
"m_Space": 2
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "10f1ba1ec3654c338ce8962b9e4229ce",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.AlphaClipThreshold",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "24cdae2dae4a4e73925dd9ec529ef7a3"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.AlphaClipThreshold"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
@@ -414,6 +491,56 @@
"m_Labels": []
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "24cdae2dae4a4e73925dd9ec529ef7a3",
"m_Id": 0,
"m_DisplayName": "Alpha Clip Threshold",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "AlphaClipThreshold",
"m_StageCapability": 2,
"m_Value": 0.0010000000474974514,
"m_DefaultValue": 0.5,
"m_Labels": [],
"m_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
"m_ObjectId": "35bd1540c2bc4f159f6f4ea7a1a0ebad",
"m_Group": {
"m_Id": ""
},
"m_Name": "SurfaceDescription.Alpha",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": 0.0,
"y": 0.0,
"width": 0.0,
"height": 0.0
}
},
"m_Slots": [
{
"m_Id": "b7dd84683b4d4df2b49c452887064332"
}
],
"synonyms": [],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
},
"m_SerializedDescriptor": "SurfaceDescription.Alpha"
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ColorRGBMaterialSlot",
@@ -768,10 +895,10 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -326.0,
"y": 317.9999694824219,
"width": 208.0000457763672,
"height": 336.0000305175781
"x": -320.0000305175781,
"y": 227.0,
"width": 208.00003051757813,
"height": 336.0
}
},
"m_Slots": [
@@ -790,7 +917,7 @@
"bump map"
],
"m_Precision": 0,
"m_PreviewExpanded": true,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
@@ -813,7 +940,7 @@
"m_ZWriteControl": 0,
"m_AlphaMode": 0,
"m_RenderFace": 2,
"m_AlphaClip": false,
"m_AlphaClip": true,
"m_CastShadows": true,
"m_ReceiveShadows": true,
"m_DisableTint": false,
@@ -864,6 +991,31 @@
"m_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "8893efe2d42d48a986c4b203aab72d1f",
"m_Id": 2,
"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_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
@@ -915,7 +1067,7 @@
"m_Id": "61ead3b8e912419a8ac378195bfb3f79"
},
{
"m_Id": "ff4dd28047cc42298632541c4e132a69"
"m_Id": "ab2979729d75466eaabbd704b09644e8"
}
],
"synonyms": [
@@ -1089,8 +1241,8 @@
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -874.9998779296875,
"y": 155.0,
"x": -879.0,
"y": 158.0,
"width": 206.0,
"height": 130.0
}
@@ -1110,10 +1262,26 @@
"m_CustomColors": {
"m_SerializableColors": []
},
"m_Space": 4,
"m_Space": 2,
"m_PositionSource": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "ab2979729d75466eaabbd704b09644e8",
"m_Id": 3,
"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.NormalMaterialSlot",
@@ -1138,6 +1306,22 @@
"m_Space": 3
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "b7dd84683b4d4df2b49c452887064332",
"m_Id": 0,
"m_DisplayName": "Alpha",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "Alpha",
"m_StageCapability": 2,
"m_Value": 0.5,
"m_DefaultValue": 1.0,
"m_Labels": [],
"m_LiteralMode": false
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.CategoryData",
@@ -1197,6 +1381,32 @@
"m_Space": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.ScreenPositionMaterialSlot",
"m_ObjectId": "dafba86ff6a04de88e0b1785c3b9307c",
"m_Id": 1,
"m_DisplayName": "Screen Position",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "ScreenPosition",
"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_ScreenSpaceType": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.BlockNode",
@@ -1255,6 +1465,31 @@
"m_Space": 0
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DynamicVectorMaterialSlot",
"m_ObjectId": "e35abfed2a10440abe9b0df46d4e8744",
"m_Id": 0,
"m_DisplayName": "In",
"m_SlotType": 0,
"m_Hidden": false,
"m_ShaderOutputName": "In",
"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_LiteralMode": false
}
{
"m_SGVersion": 2,
"m_Type": "UnityEditor.ShaderGraph.TransformNode",
@@ -1304,6 +1539,48 @@
"m_Normalize": true
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.DitherNode",
"m_ObjectId": "f5447a792d5447fe97dbf892f44a53e7",
"m_Group": {
"m_Id": ""
},
"m_Name": "Dither",
"m_DrawState": {
"m_Expanded": true,
"m_Position": {
"serializedVersion": "2",
"x": -344.0,
"y": 480.0000305175781,
"width": 201.00003051757813,
"height": 118.00003051757813
}
},
"m_Slots": [
{
"m_Id": "e35abfed2a10440abe9b0df46d4e8744"
},
{
"m_Id": "dafba86ff6a04de88e0b1785c3b9307c"
},
{
"m_Id": "8893efe2d42d48a986c4b203aab72d1f"
}
],
"synonyms": [
"blue noise",
"half tone"
],
"m_Precision": 0,
"m_PreviewExpanded": false,
"m_DismissedVersion": 0,
"m_PreviewMode": 0,
"m_CustomColors": {
"m_SerializableColors": []
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
@@ -1350,19 +1627,3 @@
}
}
{
"m_SGVersion": 0,
"m_Type": "UnityEditor.ShaderGraph.Vector1MaterialSlot",
"m_ObjectId": "ff4dd28047cc42298632541c4e132a69",
"m_Id": 3,
"m_DisplayName": "Debug",
"m_SlotType": 1,
"m_Hidden": false,
"m_ShaderOutputName": "Debug",
"m_StageCapability": 3,
"m_Value": 0.0,
"m_DefaultValue": 0.0,
"m_Labels": [],
"m_LiteralMode": false
}