Log inGet started
World

Procgen Effects Showcase

Branchmain
Branchesmain
Commit99ff90d12c

README.md

wf_pool_mat

Water material for the plunge pool at the foot of the waterfall. waterfall/wf_water.procGraph builds the still and falling water of the waterfall and assigns this material to one of its parts by name; the graph's header states that the water materials are .material assets so the Model receives their blend, cull and depth-write state. The WaterfallWater Generator entity in the Procgen Effects Showcase world's fx_falls scene runs that graph. This material goes on pool_skin: a 21 x 18.5 m grid at height -0.35, centred 4.4 m on the -z side of the waterfall's z (Z0 - 4.4).

Shader: wf_pool (waterfall/shaders/wf_pool.shader). Its README: plunge-pool water with travelling ripples, churn turbulence, two-phase radial foam flow, depth-driven shore and rock foam, fresnel sky reflection and sun glitter, and a refracted bed. It reads the scene depth already drawn under the surface to choose between a lighter and a darker water colour and to put foam where the water meets the bed and rocks; alpha runs from 0.55 to 1 with that depth term, plus foam.

Render state: blend: alphaBlend, cull: none, depth_write: false.

Properties

  • origin_x: 0 and origin_z: 42: world x and z the shader measures positions from. 42 is the Z0 constant waterfall/wf_water.procGraph places the waterfall at.
  • impact_x: 0 and impact_z: -3.5: the plunge point, relative to the origin (default impact_z -3.4). The water churns around it and the foam flows outward from it.
  • churn_radius: 3.7: size of the churned zone around the plunge point, as the falloff exp(-(d / churn_radius)^2) (default 3.6).
  • foam: 1: blend weight of the foam over the water colour (default 1.0).