Give the ground and paths surface detail #83

Closed
opened 2026-10-20 08:49:28 +00:00 by sermuns · 2 comments
Owner

Static solids are flat albedo. Solid::texture is used only by the glTF
assets and the emblem atlas, so the ground is one olive color, paths and roads are
flat polygons, and every area decal is a single fill.

The two largest areas on screen have no surface variation at all, and their
polygon edges alias badly at grazing angles and distance.

In-shader is the way in, because a texture per solid would split SolidKey
batches:

  • A triplanar detail term keyed on world position: two or three noise octaves or
    a small tileable detail texture, modulated by slope and height so grass, dirt
    and asphalt read differently.
  • fwidth-based edge fade for ribbon and area decals, so a path edge anti-aliases
    with distance like a painted line instead of stair-stepping.

Related: #16 colours paths by surface and gives this something to vary. #17 and
#41 use the same decal ladder. #89 is what stands on the result.

Static solids are flat albedo. `Solid::texture` is used only by the glTF assets and the emblem atlas, so the ground is one olive color, paths and roads are flat polygons, and every area decal is a single fill. The two largest areas on screen have no surface variation at all, and their polygon edges alias badly at grazing angles and distance. In-shader is the way in, because a texture per solid would split `SolidKey` batches: - A triplanar detail term keyed on world position: two or three noise octaves or a small tileable detail texture, modulated by slope and height so grass, dirt and asphalt read differently. - `fwidth`-based edge fade for ribbon and area decals, so a path edge anti-aliases with distance like a painted line instead of stair-stepping. Related: #16 colours paths by surface and gives this something to vary. #17 and #41 use the same decal ladder. #89 is what stands on the result.
sermuns added this to the Rendering milestone 2026-10-20 08:49:28 +00:00
Author
Owner

The ground and the paths are textured. The edges still stair-step.

Grass, gravel and asphalt are painted at startup (a42169a), the ground samples them with world-projected UVs and takes its normals from the terrain gradient, and the path and area decals pick a tile per area kind. The lit fragment also derives a detail normal from the tile's height field and modulates the albedo with a blurred second sample, which is the noise-octave term in a different shape.

What is missing is the second bullet: there is no fwidth-based edge fade on the ribbon and area decals, so a path edge still stair-steps at a distance and at grazing angles.

The ground and the paths are textured. The edges still stair-step. Grass, gravel and asphalt are painted at startup (`a42169a`), the ground samples them with world-projected UVs and takes its normals from the terrain gradient, and the path and area decals pick a tile per area kind. The lit fragment also derives a detail normal from the tile's height field and modulates the albedo with a blurred second sample, which is the noise-octave term in a different shape. What is missing is the second bullet: there is no `fwidth`-based edge fade on the ribbon and area decals, so a path edge still stair-steps at a distance and at grazing angles.
Author
Owner

Closed by the merged batch: #142 (tier1-features) landed this, rebased onto main at 609dcb8.

Closed by the merged batch: #142 (tier1-features) landed this, rebased onto main at 609dcb8.
Sign in to join this conversation.
No description provided.