feat: House of leaves, details added to wall shader

This commit is contained in:
Alexandre Coirier
2026-07-01 01:16:06 +02:00
parent 36e968ebf3
commit 85ab8ebabd
16 changed files with 1174 additions and 138 deletions
File diff suppressed because it is too large Load Diff
@@ -2,6 +2,8 @@
#define HOUSE_OF_LEAVES_INCLUDED
#include "Assets/_Content/Shaders/Include/Noises.hlsl"
#include "Assets/_Content/Shaders/Include/Details.hlsl"
#include "Assets/_Content/Shaders/Include/Utilities.hlsl"
float Hash(float n)
{
@@ -105,7 +107,6 @@ void Sand_float
sandMask *= sandDensity * .7 + .3;
// Output
Position = PositionWS;
Position.y += sandMask;
@@ -130,6 +131,13 @@ void HouseOfLeaves_float
float4 ColorE,
float3 PositionWS,
float3 NormalWS,
float ProjectionsBlend,
UnityTexture2D DetailTexA,
UnityTexture2D DetailTexB,
float DetailIntensityA,
float DetailIntensityB,
float DetailSizeA,
float DetailSizeB,
out float3 Output
)
{
@@ -195,7 +203,36 @@ void HouseOfLeaves_float
bandFrac
);
// Detail
float4 detailA = SampleProjectedDetailLOD
(
DetailTexA,
PositionWS,
NormalWS,
ProjectionsBlend,
DetailSizeA,
depth
);
float4 detailB = SampleProjectedDetailLOD
(
DetailTexB,
PositionWS,
NormalWS,
ProjectionsBlend,
DetailSizeB,
depth
);
float detailMaskA = smoothstep(0, .8, detailA.a);
float detailMaskB = smoothstep(0, .8, detailB.a);
Output = col;
Output = lerp(Output.rgb, detailA.rgb, detailMaskA * DetailIntensityA);
Output = lerp(Output.rgb, detailB.rgb, detailMaskB * DetailIntensityB);
}
#endif