Rust voxel sandbox (wgpu + wasm + axum multiplayer)
Find a file
Maximus Gorog 6a1dc2da83 Cut god-rays + FXAA cost (still all features, just cheaper)
You asked "Are you spawning too many godrays?" — yes, 32 samples
per ¼-res pixel was overkill. Plus FXAA was a 5-tap blur at full res
and the sun disc was pow(cos, 800) which is itself a slow op.

shafts.wgsl:
  N_SAMPLES 32 → 16. DECAY + WEIGHT rebalanced to keep total
  intensity the same with half the samples. At ¼ res with a 16-step
  decay the rays still trace cleanly (no banding). Halves the
  god-rays fragment cost.

post.wgsl:
  FXAA from 5-tap (NW/NE/SW/SE corners + center) to 2-tap (center +
  SE diagonal). Voxel-game edges are axis-aligned and high-contrast,
  so two-tap diagonal softening is enough to kill the staircase
  artifacts that motivated AA. 2.5× cheaper per pixel; full-screen
  fragment work goes from ~6 texture reads + math to ~3.

shader.wgsl:
  Sun disc sharpness pow(cos, 800) → pow(cos, 256) at zenith,
  pow(cos, 160) → pow(cos, 120) at horizon. The disc still reads
  crisp visually, and pow on smaller exponents is materially
  faster on weak GPUs / software rasterizers.

  Moon disc + halo now gated behind night > 0.05 — invisible during
  the day anyway, so skipping the pow(cos, 256) saves work on every
  daytime sky pixel.

render/mod.rs:
  Mask + shafts passes skipped at the CPU level when sun is below
  horizon (the shader was already returning black, but we paid pass
  setup + clear regardless). Replaced with a single "shafts clear"
  pass at night so the post pass doesn't see yesterday's rays.

No features dropped. Tests: 63/63 passing. Wasm release built.
2026-05-24 15:52:46 -06:00
server pre-alpha 0.0.1 — initial multiplayer voxel sandbox 2026-05-22 23:33:47 -06:00
src Cut god-rays + FXAA cost (still all features, just cheaper) 2026-05-24 15:52:46 -06:00
test Tick/toc instrumentation across build + test + mesh phases 2026-05-24 11:49:08 -06:00
web Runtime perf: cheap fog, sky overdraw kill, fewer cloud octaves, in-game FPS HUD 2026-05-24 15:44:14 -06:00
.dockerignore Add Docker + Caddy deploy for voxel.mxvs.art 2026-05-23 18:45:05 -06:00
.gitignore pre-alpha 0.0.1 — initial multiplayer voxel sandbox 2026-05-22 23:33:47 -06:00
ARCHITECTURE.md Add ARCHITECTURE.md mapping the functional-core/imperative-shell split 2026-05-23 23:33:02 -06:00
build-web.sh pre-alpha 0.0.1 — initial multiplayer voxel sandbox 2026-05-22 23:33:47 -06:00
Caddyfile Add Docker + Caddy deploy for voxel.mxvs.art 2026-05-23 18:45:05 -06:00
Cargo.lock pre-alpha 0.0.1 — initial multiplayer voxel sandbox 2026-05-22 23:33:47 -06:00
Cargo.toml pre-alpha 0.0.1 — initial multiplayer voxel sandbox 2026-05-22 23:33:47 -06:00
DEPLOY.md DEPLOY.md: add active-deployment runbook for voxel.mxvs.art 2026-05-23 22:52:43 -06:00
docker-compose.prod.yml Add Docker + Caddy deploy for voxel.mxvs.art 2026-05-23 18:45:05 -06:00
docker-compose.yml Add Docker + Caddy deploy for voxel.mxvs.art 2026-05-23 18:45:05 -06:00
Dockerfile Add Docker + Caddy deploy for voxel.mxvs.art 2026-05-23 18:45:05 -06:00
run.sh Tick/toc instrumentation across build + test + mesh phases 2026-05-24 11:49:08 -06:00