fix: HouseOfLeaves sand setup
This commit is contained in:
@@ -28,10 +28,11 @@ void Sand_float
|
||||
|
||||
// Arks
|
||||
|
||||
float arkMask = abs(frac(PositionWS.z * .5) * 2 - 1);
|
||||
/*float arkMask = abs(frac(PositionWS.z * .5) * 2 - 1);
|
||||
arkMask = pow(smoothstep(.7, 0, arkMask), 2);
|
||||
arkMask += smoothstep(2.8, 3.2, abs(PositionWS.x));
|
||||
arkMask = saturate(arkMask);
|
||||
arkMask = saturate(arkMask);*/
|
||||
float arkMask = 0;
|
||||
|
||||
// Sand
|
||||
|
||||
@@ -39,12 +40,14 @@ void Sand_float
|
||||
|
||||
float sandDirection = cos(t * sandLayers * 3.14);
|
||||
|
||||
float sandDensity = smoothstep(1.5, 0, abs(PositionWS.x));
|
||||
sandDensity = saturate(sandDensity + arkMask);
|
||||
//float sandDensity = smoothstep(1.5, 0, abs(PositionWS.x));
|
||||
//sandDensity = saturate(sandDensity + arkMask);
|
||||
|
||||
float sandPatern = RidgedNoise3D(PositionWS + float3(sandDirection, 0, 0), .6, 1, 2, .5) * .8;
|
||||
sandPatern += 1 - RidgedNoise3D(PositionWS + float3(0, 0, t * sandLayers * 2), .8, 2, 2, .5) * .2;
|
||||
|
||||
float sandDensity = sqrt(smoothstep(0, 2, abs(PositionWS.x) + sandPatern));
|
||||
|
||||
float sandGradientSign = (floor(t * sandLayers) % 2 == 0) ? 1 : -1;
|
||||
float sandGradient = smoothstep(2 * -sandGradientSign, 2 * sandGradientSign, PositionWS.x);
|
||||
float sandPhase = frac(t * sandLayers);
|
||||
|
||||
Reference in New Issue
Block a user