Log inGet started
World

Sunfall Ridge

Branchmain
Branchesmain
Commitd4ca437cd5

README.md

GroundTable

Hands the ridge's ground material the landscape's layer textures. It sits on the ridge entity beside the Terrain (added by land() in scenes/main.scene/build.luau).

The Terrain wears a copy of sunfall.dressing.ridgeGround, and a material named on a Terrain is given the terrain surface contract but nothing of the landscape's table of surfaces. The material's file carries the table's numbers (tints, tilings, rules, which slice each layer reads); this component binds the three texture arrays (layer_albedo, layer_normal, layer_mask) from the slices the landscape wrote, and binds them again whenever the Terrain makes its copy again: a load, a cook, an edit of the shader.

The arrays are bound here rather than stated in the material's file because the world's validation reads an array: texture reference in a material's source as one asset reference that does not resolve, and refuses the push.

  • every: frames between two looks at which material the ground wears (12).
  • :bound(): true once the arrays are on the material the Terrain wears now.

Until the arrays are bound (a few frames after a load) the ground draws with the layers' tints alone.