Facade detail, per-solid materials and ground-contact occlusion #138

Merged
sermuns merged 2 commits from tier-a-visuals into main 2026-10-23 15:12:17 +00:00
Owner

Tier A of the visual pass: bake more surface detail into the scene at build time, so nothing is added per frame.

What

  • Per-solid roughness/metallic. Static solids were hardcoded to roughness = 0.9, metallic = 0.0; they now carry their own values, plumbed through ObjectU.mat_params and SolidKey. Window glass takes its roughness from the new Palette::window_roughness.
  • Ground-contact occlusion. A new apply_ground_contact_ao multiplies a height-based contact term into Soup.ao for vertical faces, sampling the terrain under each vertex. Walls, barriers and props sit on the ground instead of floating on flat ambient.
  • Facade and roof detail textures, generated at startup like the ground tiles, with a new facade_uvs projection that unwraps each triangle by its face normal.
  • Building color variation for buildings that fall back to the placeholder slate. Measured colors are untouched.
  • Windows are more opaque and duller.

assets/baked/valla.bin is unchanged, so no rebake is needed.

Cost

No new passes, draw states or vertex attributes: ao, uv and the object-uniform slots already existed. Startup adds two generated 256² textures and one terrain sample per building/decor vertex.

Version

Backwards compatible — no wire or bake-layout change. Merged under the batch's single major bump to 2.0.0; this branch's own bump commit was dropped on rebase.

Checks

just check passes.

Merged

Merged into main as part of the batch (order: #136, #142, #137, #138, #141, #139, #140, #143). The batch carries a single major bump, 1.1.2 → 2.0.0, so this branch's own bump commit was dropped when it was rebased; PROTOCOL_VERSION stays 2. assets/baked/valla.bin was rebaked once at the end of the batch.

Tier A of the visual pass: bake more surface detail into the scene at build time, so nothing is added per frame. ## What - **Per-solid roughness/metallic.** Static solids were hardcoded to `roughness = 0.9, metallic = 0.0`; they now carry their own values, plumbed through `ObjectU.mat_params` and `SolidKey`. Window glass takes its roughness from the new `Palette::window_roughness`. - **Ground-contact occlusion.** A new `apply_ground_contact_ao` multiplies a height-based contact term into `Soup.ao` for vertical faces, sampling the terrain under each vertex. Walls, barriers and props sit on the ground instead of floating on flat ambient. - **Facade and roof detail textures**, generated at startup like the ground tiles, with a new `facade_uvs` projection that unwraps each triangle by its face normal. - **Building color variation** for buildings that fall back to the placeholder slate. Measured colors are untouched. - **Windows** are more opaque and duller. `assets/baked/valla.bin` is unchanged, so no rebake is needed. ## Cost No new passes, draw states or vertex attributes: `ao`, `uv` and the object-uniform slots already existed. Startup adds two generated 256² textures and one terrain sample per building/decor vertex. ## Version Backwards compatible — no wire or bake-layout change. Merged under the batch's single major bump to 2.0.0; this branch's own bump commit was dropped on rebase. ## Checks `just check` passes. ## Merged Merged into `main` as part of the batch (order: #136, #142, #137, #138, #141, #139, #140, #143). The batch carries a single major bump, `1.1.2` → `2.0.0`, so this branch's own bump commit was dropped when it was rebased; `PROTOCOL_VERSION` stays 2. `assets/baked/valla.bin` was rebaked once at the end of the batch.
sermuns force-pushed tier-a-visuals from 0008f10b2f to 8c74af6c66 2026-10-23 15:12:12 +00:00 Compare
Sign in to join this conversation.
No description provided.