Log inGet started
World

Procgen Effects Showcase

Branchmain
Branchesmain
Commit99ff90d12c

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

PropertyTypeDefaultMeaning
bumpfloat0.55Strength of the bump normal (range 0 to 3).
mossfloat1.0Amount of moss on wet upward faces (range 0 to 2).
tintcolor[1, 1, 1, 1]Multiplies the albedo.
gainfloat0.75Multiplies the albedo (range 0 to 2).
origin_xfloat0World X of the waterfall origin.
origin_yfloat0World Y of the waterfall origin.
origin_zfloat0World Z of the waterfall origin.