Skip to content

feat(biome): Milestone 2 — Biome Colors + Mountains 10x Height#15

Merged
maxfelker merged 2 commits into
mainfrom
feature/biome-m2-textures
Mar 2, 2026
Merged

feat(biome): Milestone 2 — Biome Colors + Mountains 10x Height#15
maxfelker merged 2 commits into
mainfrom
feature/biome-m2-textures

Conversation

@maxfelker

Copy link
Copy Markdown
Owner

Milestone 2: Biome Color Variety

Changes

  • Mountains 10x height: HeightMultiplier updated from 3.0 → 10.0 per user request
  • Biome solid colors: Each biome renders with a distinct solid color (no texture assets required)
    • 🟩 Grassland: green
    • 🟨 Desert: sandy tan
    • ⬜ Mountains: grey rock
    • 🟢 Valley: lighter green
    • 🫒 Swamp: dark olive
    • 🌲 Forest: deep green
  • biomeId in GPU uniform: biomeId passed from Go → TypeScript → GPU uniform buffer → fragment shader
  • Lighting preserved: Existing normal-based diffuse lighting still applies on top of biome color

Testing

  • All Go biome tests pass
  • All TypeScript tests pass
  • Docker prod build verified

Part of the 5-milestone biome system plan.

maxfelker and others added 2 commits March 1, 2026 15:58
- Mountains HeightMultiplier increased from 3.0 to 10.0 (user request)
- Pass biomeId through per-chunk GPU uniform buffer
- Fragment shader: solid color per biome with lighting preserved
  Grassland=green, Desert=tan, Mountains=grey, Valley=lt-green,
  Swamp=dark-olive, Forest=deep-green
- UNIFORM_BUFFER_SIZE updated to accommodate biomeId float (128 → 144)

All Go tests pass. All TS tests pass. Docker prod build verified.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- selector.go: remove pre-scaling of coords before FBm (was causing double
  scaling: effective coord was worldX * scale^2 = near-zero, producing flat
  noise and no biome variety). Now pass raw world coords; FBm handles freq.
- Temperature now ranges ~0.0–1.0 giving full biome variety: mountains,
  desert, swamp, valley, forest all generate correctly
- fragment shader: getHeightBlendedColor() blends biome base color toward
  grey rock (y>60) and snow (y>300) based on worldPos.y, so mountain peaks
  naturally go grey/white without hard chunk-boundary color edges
- Added TestBiomeNoiseProvidesVariety: verifies temp range > 0.4 and at
  least 3 biome types appear in a 20k×20k scan

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@maxfelker maxfelker merged commit 081e0e9 into main Mar 2, 2026
1 check passed
@maxfelker maxfelker deleted the feature/biome-m2-textures branch March 2, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant