biome-plugin

The Babylon half of the procedural terrain shader (TERRAIN-SHADER-DESIGN.md): a MaterialPluginBase that replaces the diffuse of the terrain material with world-space biome classification — the GLSL mirror of biome-chart's pure, unit-tested model (one function per shader expression, same names).

This is build-order step 1 + 3: flat-colour biome cells (validate the chart mapping before any texture), fBm axis noise + edgeDither, the slope cliff override, and the photic cutoff sharing b3d-water's fog curve. The array-atlas sampling (step 2) replaces cellColour with TEXTURE_2D_ARRAY fetches later — the classification above it doesn't change.

Attach via b3d-terrain's biome="on" attribute, or attachBiomePlugin on any material for authored tiles. Being a plugin (not a ShaderMaterial), scene lighting, shadows, and fog keep composing — the same reason cloud-shadows is a plugin.