Procgen Effects Showcase
- ..
- .metadata260 B
- README.md2.1 KB
- preview.png49.6 KB
- properties.yaml416 B
- shader.wgsl3.4 KB
README.md
wf_rock
World-space procedural wet rock: strata, moss, mineral streaks, bump and spray-driven wetness for
the meshed signed-distance cliff of the waterfall. Every pattern is computed from the world position
relative to the waterfall's origin (origin_x, origin_y, origin_z). It is a surface() shader
that fills a PbrSurface.
A height field of fx_noise fBm plus ridged fBm gives the bump normal, scaled by bump. The dry
rock is warm and pale, banded into long warped horizontal beds with grain. Dark seeps run down the
face on either side of the falls, fading out between 6 and 17 units from its centre line. Wetness
comes from the falls' spray around the plunge line, the waterline around the pool, and the seeps;
wet rock is darker (by up to 42 percent) and glossier (roughness from 0.92 down to 0.28). Moss grows
on gentle upward faces that stay wet, scaled by moss, and rust-brown mineral streaks run down the
face. The albedo is multiplied by gain and tint, and occlusion follows the height field.
The wf_env graph (waterfall/wf_env.procGraph) applies it to the cliff, plunge basin and boulders it
contours from signed-distance solids, with the origin at z 42, bump 0.55 and moss 1.0. The
Procgen Effects Showcase world's wf_ground_mat material uses it with the same origin, bump 0.4, gain 1.15, moss 1.3 and a
warm tint (1.25, 1.08, 0.85), and the Procgen Effects Showcase world's fx_falls scene places that material.
The shader includes fx_noise and @builtin::shaderModules.pbr_shading.
Properties
| Property | Type | Default | Meaning |
|---|---|---|---|
bump | float | 0.55 | Strength of the bump normal (range 0 to 3). |
moss | float | 1.0 | Amount of moss on wet upward faces (range 0 to 2). |
tint | color | [1, 1, 1, 1] | Multiplies the albedo. |
gain | float | 0.75 | Multiplies the albedo (range 0 to 2). |
origin_x | float | 0 | World X of the waterfall origin. |
origin_y | float | 0 | World Y of the waterfall origin. |
origin_z | float | 0 | World Z of the waterfall origin. |