fl_surface
The forest-floor surface shader of *First Light: Goura*. The ground, the bark, the buttress roots, the fallen logs, the leaf litter and the roost tree all draw through this one shader; what makes them different things is the material.
fl_surface
The forest-floor surface shader of First Light: Goura. The ground, the bark, the buttress roots, the fallen logs, the leaf litter and the roost tree all draw through this one shader; what makes them different things is the material.
It is a surface() shader — it fills a PbrSurface and the engine lights it —
built for a place that is seen first in near-darkness and then in low, raking
gold light. Two properties of that place are what the shader spends its budget
on: variation that does not repeat across a 120 metre lane, and a normal broken
up finely enough that a low sun rakes it.
What it does
Three world-space noise fields stack, each with its own scale so they pool in different places:
| Field | Reads as |
|---|---|
| macro | which of base_color / alt_color this patch of surface is |
| damp | wet duff, mud, the dark under a log — darker and much glossier |
| moss | growth on upward-facing geometry only, gated by moss_facing |
A fourth, finer field speckles the albedo, roughens it unevenly, and — through its gradient — perturbs the shading normal, which is what gives bark its grain and litter its tooth without a texture.
emissive + emissive_intensity is how the roost crown catches the first gold:
the Floor component raises the intensity as dawn.light() rises.
Vertex colours
Per-vertex colour is half the authoring surface:
rgbmultiplies the albedo. Every mesh the floor slice builds paints its own large-scale variation into it — a trunk darker at the base, a log bleached along its top, the ground pooled into shadow around cover.adrives ambient occlusion betweencavityand 1, so a mesh can bury its own crevices without a baked map.
Properties
properties.yaml carries the full set with defaults. The ones that decide the
look: base_color / alt_color, grain (scales every field at once),
macro_scale, detail_scale, bump, damp_amount, moss_amount.
Set double_sided on a material whose geometry is drawn with cull: none.
Scoped to this part · feeds back into the world's score.