style: run format:apply pass
This commit is contained in:
+1
-2
@@ -209,8 +209,7 @@ function Grass({
|
|||||||
|
|
||||||
const density = (1.0 - fallofFactor) * (1.0 - fallofFactor);
|
const density = (1.0 - fallofFactor) * (1.0 - fallofFactor);
|
||||||
|
|
||||||
if (Math.random() > density)
|
if (Math.random() > density) continue;
|
||||||
continue;
|
|
||||||
|
|
||||||
const localY = getTerrainHeight(
|
const localY = getTerrainHeight(
|
||||||
localX,
|
localX,
|
||||||
|
|||||||
@@ -19,15 +19,15 @@ vec2 windDir = vec2(
|
|||||||
);
|
);
|
||||||
windDir = normalize(windDir - 0.5) * 0.8;
|
windDir = normalize(windDir - 0.5) * 0.8;
|
||||||
|
|
||||||
float taperFactor = pow(uv.y, 4.0); // Stays near 0 for long, then shoots to 1 at tip
|
float taperFactor = pow(uv.y, 4.0);
|
||||||
float taper = 1.0 - taperFactor * 0.6; // Width goes from 1.0 to 0.4 at tip
|
float taper = 1.0 - taperFactor * 0.6;
|
||||||
transformed.x *= taper;
|
transformed.x *= taper;
|
||||||
transformed.z *= taper;
|
transformed.z *= taper;
|
||||||
|
|
||||||
float curveStrength = 3.0 + noiseVal * 2.0;
|
float curveStrength = 2.0 + noiseVal * 2.0;
|
||||||
float curveAmount = uv.y * uv.y * curveStrength;
|
float curveAmount = uv.y * uv.y * curveStrength;
|
||||||
|
|
||||||
vec2 curveDir = normalize(vec2(noiseVal, fbm(vec2(worldZ, worldX))) - 0.5); // Randomize curve direction
|
vec2 curveDir = normalize(vec2(noiseVal, fbm(vec2(worldZ, worldX))) - 0.5);
|
||||||
transformed.x += curveAmount * curveDir.x * 0.5;
|
transformed.x += curveAmount * curveDir.x * 0.5;
|
||||||
transformed.z += curveAmount * curveDir.y * 0.5;
|
transformed.z += curveAmount * curveDir.y * 0.5;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user