wip: Sand shader remive unused lines
This commit is contained in:
@@ -14,24 +14,11 @@ void Sand_float
|
|||||||
out float Alpha
|
out float Alpha
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//float t = frac(_Time.y / 20);
|
|
||||||
float t = Progression;
|
float t = Progression;
|
||||||
t -= RidgedNoise3D(PositionWS, .3, 1, 2, .5) * .3;
|
t -= RidgedNoise3D(PositionWS, .3, 1, 2, .5) * .3;
|
||||||
|
|
||||||
|
|
||||||
float depth = length(PositionWS - _WorldSpaceCameraPos.xyz);
|
float depth = length(PositionWS - _WorldSpaceCameraPos.xyz);
|
||||||
//Light mainLight = GetMainLight(0);
|
|
||||||
//float3 mainLightDir = normalize(mainLight.direction);
|
|
||||||
//float lightGradient = dot(normalize(NormalWS), normalize(mainLightDir));
|
|
||||||
//lightGradient = smoothstep(-.5, 1, lightGradient);
|
|
||||||
//float ao = GetScreenSpaceAmbientOcclusion(ScreenUV).directAmbientOcclusion;
|
|
||||||
|
|
||||||
// Arks
|
|
||||||
|
|
||||||
/*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);*/
|
|
||||||
float arkMask = 0;
|
float arkMask = 0;
|
||||||
|
|
||||||
// Sand
|
// Sand
|
||||||
@@ -40,9 +27,6 @@ void Sand_float
|
|||||||
|
|
||||||
float sandDirection = cos(t * sandLayers * 3.14);
|
float sandDirection = cos(t * sandLayers * 3.14);
|
||||||
|
|
||||||
//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;
|
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;
|
sandPatern += 1 - RidgedNoise3D(PositionWS + float3(0, 0, t * sandLayers * 2), .8, 2, 2, .5) * .2;
|
||||||
|
|
||||||
@@ -57,18 +41,6 @@ void Sand_float
|
|||||||
float sandMask = sandFlow * 1.5 - t * .8 + (sandPatern * 2 - 1) * sandDensity * t * .3;
|
float sandMask = sandFlow * 1.5 - t * .8 + (sandPatern * 2 - 1) * sandDensity * t * .3;
|
||||||
sandMask *= sandDensity * .7 + .3;
|
sandMask *= sandDensity * .7 + .3;
|
||||||
|
|
||||||
// Test
|
|
||||||
|
|
||||||
//float test = ValueNoise3D(PositionWS, 40);
|
|
||||||
//float test = PerlinNoise3D(PositionWS, 40);
|
|
||||||
//float test = PerlinNoise3DLOD(PositionWS, 100, 3.5);
|
|
||||||
//float test = SimplexNoise3D(PositionWS, 40);
|
|
||||||
//float test = WorleyNoise3D(PositionWS, 40, 1);
|
|
||||||
//float id;
|
|
||||||
//float test = VoronoiNoise3D(PositionWS, 10, 1, .05, id);
|
|
||||||
//float test = FBMNoise3D(PositionWS, 10, 2, 2, .5);
|
|
||||||
//float test = RidgedNoise3D(PositionWS, 10, 2, 2, .5);
|
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
|
|
||||||
Position = PositionWS;
|
Position = PositionWS;
|
||||||
@@ -77,7 +49,6 @@ void Sand_float
|
|||||||
Height = sandMask;
|
Height = sandMask;
|
||||||
|
|
||||||
Alpha = smoothstep(1, .5, abs(smoothstep(-20, 20, PositionWS.x) * 2 - 1));
|
Alpha = smoothstep(1, .5, abs(smoothstep(-20, 20, PositionWS.x) * 2 - 1));
|
||||||
//Debug = sandFlow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user