{"id":50772457,"url":"https://github.com/jo56/procedural-terrain","last_synced_at":"2026-06-11T20:05:17.896Z","repository":{"id":346084275,"uuid":"1113476815","full_name":"jo56/procedural-terrain","owner":"jo56","description":"WebGPU compute-based procedural terrain generator that runs in the browser via WebAssembly","archived":false,"fork":false,"pushed_at":"2026-04-29T19:01:18.000Z","size":1519,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-29T21:06:42.747Z","etag":null,"topics":["3d","procedural-generation","rust","rust-wasm","wasm","webgpu","wgpu"],"latest_commit_sha":null,"homepage":"https://procedural-terrain-simulator.pages.dev","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jo56.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-10T03:11:44.000Z","updated_at":"2026-04-29T19:01:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jo56/procedural-terrain","commit_stats":null,"previous_names":["jo56/procedural-terrain"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jo56/procedural-terrain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo56%2Fprocedural-terrain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo56%2Fprocedural-terrain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo56%2Fprocedural-terrain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo56%2Fprocedural-terrain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jo56","download_url":"https://codeload.github.com/jo56/procedural-terrain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jo56%2Fprocedural-terrain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34215411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","procedural-generation","rust","rust-wasm","wasm","webgpu","wgpu"],"created_at":"2026-06-11T20:05:17.118Z","updated_at":"2026-06-11T20:05:17.891Z","avatar_url":"https://github.com/jo56.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Procedural Terrain Simulator\n\n  \u003cdiv align=\"center\"\u003e\n      \u003ca href=\"https://procedural-terrain-simulator.pages.dev/\" target=\"_blank\"\u003e\n          \u003cimg src=\"assets/procedural-terrain.png\" alt=\"proedural terrain\"\u003e\n      \u003c/a\u003e\n      \u003cbr\u003e\n      \u003ca href=\"https://procedural-terrain-simulator.pages.dev/\" target=\"_blank\"\u003e\n          \u003cb\u003eprocedural-terrain-simulator.pages.dev\u003c/b\u003e\n      \u003c/a\u003e\n  \u003c/div\u003e\n\n\u003cbr\u003e\n\nA browser-based procedural terrain generator using Rust, WebAssembly, and WebGPU. Terrain heightmaps are computed on the GPU via WGSL compute shaders with real-time chunk streaming.\n\n## Features\n- GPU-computed terrain using WGSL compute shaders\n- Procedural generation with simplex noise and domain warping\n- Multiple terrain patterns\n- Chunked world with streaming (33x33 chunk radius)\n- Fly camera controls (WASD + mouse look)\n- Height and slope-based terrain coloring\n- Dynamic sky system with configurable stars, suns, and moons\n- Multiple terrain presets\n- Real-time settings panel with color customization\n- Multiple color themes with real-time switching\n- Atmospheric fog\n\n## Prerequisites\n\n- [Rust](https://rustup.rs/) toolchain (stable)\n- wasm-pack: `cargo install wasm-pack`\n- [Node.js](https://nodejs.org/) (v18+)\n- A WebGPU-capable browser (see below)\n\n## Browser Support\n\nAs of December 2025, **WebGPU is now supported across all major browsers** \n\n| Browser | Version | Platforms | Notes |\n|---------|---------|-----------|-------|\n| Chrome | 113+ | Windows, macOS, ChromeOS | Stable since April 2023 |\n| Chrome | 121+ | Android 12+ | Qualcomm/ARM GPUs |\n| Edge | 113+ | Windows, macOS | Stable since April 2023 |\n| Firefox | 141+ | Windows | Enabled by default |\n| Firefox | 145+ | macOS (ARM64) | Requires macOS Tahoe |\n| Safari | 26+ | macOS, iOS, iPadOS, visionOS | Enabled by default |\n\n### Safari Support Details\n\nSafari 26 (shipping with macOS Tahoe, iOS 26, iPadOS 26, and visionOS 26) now includes WebGPU **enabled by default**. This is a major development - WebGPU maps directly to Metal on Apple platforms\n\nPopular frameworks like Three.js, Babylon.js, Unity, and PlayCanvas all work in Safari 26. If you're on an older Safari version, you can enable WebGPU in Safari Technology Preview via **Develop \u003e Feature Flags \u003e WebGPU**.\n\n### Platform Notes\n\n- **Linux**: WebGPU support is still in progress for Firefox and Chrome\n- **Intel Macs**: Firefox support is in progress (ARM64 Macs are supported)\n- WebGPU requires a **secure context** (`localhost` or HTTPS)\n\n## Setup\n\n1. Install Rust target:\n```bash\nrustup target add wasm32-unknown-unknown\n```\n\n2. Install wasm-pack:\n```bash\ncargo install wasm-pack\n```\n\n3. Install npm dependencies:\n```bash\nnpm install\n```\n\n## Development\n\nRun the development server:\n```bash\nnpm run dev\n```\n\nThis will:\n1. Build the WASM module (debug mode)\n2. Start Vite dev server (defaults to http://localhost:5173)\n\n## Production Build\n\n```bash\nnpm run build\n```\n\nOutput will be in the `dist/` folder, ready for deployment.\n\n## Scripts\n\n- `npm run wasm:dev` - build only the WASM bundle in debug mode.\n- `npm run wasm:release` - build the optimized WASM bundle.\n- `npm run preview` - serve the built assets in `dist/` for a local production check.\n\n## Controls\n\n| Key | Action |\n|-----|--------|\n| Click | Capture mouse |\n| WASD / IJKL | Move forward/left/back/right |\n| Mouse | Look around |\n| Q/E or U/O | Rotate left/right |\n| Scroll Wheel | Zoom in/out |\n| Space | Move up |\n| Shift | Move down |\n| R | Regenerate terrain |\n| Tab | Toggle settings panel |\n| Esc | Release mouse |\n\n## Settings Panel\n- Non-linear sliders for terrain scale, warp strength, and roughness give finer control near low values.\n- Preset buttons come from the Rust preset list; switching back to **Custom** restores your tweaked values.\n- Color themes adjust only color inputs, while sky/weather presets adjust their respective sliders without touching unrelated fields.\n- Apply regenerates terrain only when generation settings change; color-only tweaks update in place.\n- The reset button (or `R`) keeps current parameters but randomizes the seed for a fresh layout.\n\n## Weather System (Work in Progress)\n\n\u003e **Note:** This feature is currently under development and is disabled by default in the deployed version.\n\nThe particle system supports rain and snow effects with GPU-accelerated compute shaders.\n\n**Available Weather Presets:**\n- None (disabled)\n- Light Rain / Heavy Rain / Drizzle\n- Light Snow / Heavy Snow / Blizzard\n\n**Customizable Parameters:**\n- Particle density (affects count)\n- Fall speed\n- Wind direction (X/Z)\n- Particle color\n\n## Project Structure\n\n```\nsrc/\n  lib.rs          # WASM entry point and JS bindings\n  webgpu.rs       # WebGPU initialization\n  camera.rs       # Fly camera\n  terrain.rs      # Chunk management and rendering\n  sky.rs          # Sky renderer (stars, suns, moons)\n  particles.rs    # Particle system (weather) [WIP]\n  presets.rs      # Terrain and sky presets\n  input.rs        # Input handling\n  utils.rs        # Utilities\nshaders/\n  terrain.wgsl    # Terrain compute + render shaders\n  sky.wgsl        # Sky rendering shaders\n  particles.wgsl  # Particle compute + render shaders [WIP]\nweb/\n  index.html\n  main.ts\n  style.css\n  constants.ts    # Configuration constants\n  types.ts        # TypeScript type definitions\n  utils.ts        # Utility functions\n  public/         # Static assets (favicons, manifest)\nassets/           # Screenshots and images\nCargo.toml\npackage.json\nvite.config.ts\ntsconfig.json\n```\n\n## Technical Details\n\n- **Chunk Size**: 64x64 vertices per chunk\n- **View Distance**: 33x33 chunks (~2km radius)\n- **Terrain Generation**: Simplex noise with configurable octaves + domain warping\n- **Chunk Pool**: 1089 pre-allocated chunks with LRU recycling\n- **Sky Objects**: Up to 8000 stars, 200 celestial bodies (suns/moons combined)\n- **Particles** (WIP): Up to 50,000 weather particles with GPU compute updates\n\n## Architecture\n\n- **Presets** (Rust): Complete terrain/sky/particle configurations that load all settings at once\n- **Color Themes** (TypeScript): Quick color palette swaps for terrain and sky colors only\n- **Weather Presets** (TypeScript): Quick weather effect configurations [WIP]\n\n## Troubleshooting\n\n- WebGPU requires a secure context: use `localhost` or HTTPS.\n- On Windows, if a build fails with an access error under synced folders (e.g., OneDrive), rerun from an elevated shell or set `CARGO_TARGET_DIR` to a fully writable location.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjo56%2Fprocedural-terrain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjo56%2Fprocedural-terrain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjo56%2Fprocedural-terrain/lists"}