storm_ground
Ground material for the lightning storm scene `fx_storm`. The scene's `ground` entity (a built-in cube scaled 90 x 0.2 x 90 at (-100, -0.1, 220)) wears it. The `StormDirector` component on the `storm` entity resolves it by name and, on each frame where the strike light changes, w…
storm_ground
Ground material for the lightning storm scene fx_storm. The scene's ground entity (a built-in
cube scaled 90 x 0.2 x 90 at (-100, -0.1, 220)) wears it. The StormDirector component on the
storm entity resolves it by name and, on each frame where the strike light changes, writes flash
and bolt_pos for the strongest current strike.
Shader: storm_ground (storm/shaders/storm_ground.shader). Its README: sodden ground, with
churned earth, rock, puddles with animated rain rings, and the lightning bolt's reflection in the
pools. From its header: world-space and texture-free; puddles fill the hollows of a procedural
height field and mirror the sky, rain rings spread on every wet patch, the strike's reflection is
traced from the reflected view ray to the bolt's column, and a distance haze matched to the sky's
horizon blends the far ground away.
Render state: the defaults (opaque blend, back faces culled, depth write on).
Properties
mat.yaml sets center_x and center_z, every other property takes the shader default, and the
director writes two of them at runtime:
wet0.95: darkens the albedo, lowers roughness and fills more of the hollows with water.puddles1.0: multiplier on puddle coverage.flash0.0 (range 0 to 20): strike brightness, written byStormDirector; it scales the bolt's reflection in the pools and brightens the distance haze.bolt_pos(0, 0, 0, 0): position of the strike's target, written byStormDirector; the shader uses its x and z as the bolt's column.fog0.011: density of the distance haze, applied as1 - exp(-distance * fog).center_x-100,center_z220: where the keep stands; the ground within 9 units of it stays a drier apron and the puddles fill in from 9 to 16 units out.
Scoped to this part · feeds back into the world's score.