Files
MCMapper-Backend/worker/.env.example
T
octoturge 1a0ccd8b17 Add GPU-accelerated rendering: cpu/gpu/hybrid RenderBackend (Phase 8)
Splits RenderBackend's per-voxel face-visibility extraction and tile
shading out as GPU-offloadable steps (wgpu compute shaders), while
keeping greedy-mesh merge/compaction CPU-only per the plan's "partial
GPU rendering" design. RENDER_BACKEND=cpu|gpu|hybrid selects the
strategy, falling back to cpu automatically (logged) if no compatible
GPU adapter is found. Verified against a real GPU: all tests pass,
including ones asserting byte-identical output between the cpu and
gpu backends; a new benchmark example honestly shows cpu currently
outperforming gpu/hybrid at realistic batch sizes since each call is
its own dispatch/readback round trip rather than batched across a
whole render batch (documented as a follow-up optimization).

Also fixes two real, pre-existing gaps found while validating the
worker's actual `docker build`: a missing .dockerignore was sending
the local multi-GB target/ dir into the build context, and the
Dockerfile's rust:1.80 pin was already too old for current
transitive dependency MSRVs (bumped to rust:1.97).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015tKdPZt78zbPUZMXWzKEKt
2026-08-09 21:39:32 +02:00

31 lines
1.7 KiB
Bash

DATABASE_URL=postgres://mcmapper:mcmapper@postgres:5432/mcmapper
REDIS_URL=redis://redis:6379
# See api/.env.example for what this points at and why — same shared MinIO instance/bucket,
# same rule: MINIO_SECRET_KEY is real, set it in an untracked `.env` next to this file, never here.
MINIO_ENDPOINT=192.168.0.3
MINIO_PORT=28205
MINIO_USE_SSL=false
MINIO_ACCESS_KEY=mcmapper
MINIO_SECRET_KEY=changeme-set-in-untracked-env
# cpu | gpu | hybrid (Phase 8) — see render/mod.rs's RenderBackend doc comment. `gpu` offloads
# tile shading and per-voxel face-visibility extraction to a wgpu compute shader; `hybrid` offloads
# only tile shading and keeps meshing on CPU. Unrecognized values, and `gpu`/`hybrid` on a machine
# with no compatible GPU adapter, fall back to `cpu` with a logged warning rather than crashing.
RENDER_BACKEND=cpu
# Thread count for the rayon pool that renders a batch of dirty chunks in parallel (see
# config.rs/main.rs — a single 16x16 tile is too small for rayon to help within itself, so the
# parallelism target is many chunks in flight at once). `auto` (default) uses
# std::thread::available_parallelism(); set a positive integer to override (0/garbage also falls
# back to auto).
RENDER_THREADS=auto
# server | consumer — tunes how many dirty-chunk entries are pulled off the Redis stream per
# xread cycle before being rendered in parallel. `server` (default) batches more aggressively —
# many small batches so every core on a many-core Xeon-style box stays fed; `consumer` uses
# fewer, larger batches, less scheduling overhead per chunk on fewer/faster cores. Unrecognized
# values fall back to `server`, matching this project's own primary deployment target.
RENDER_PROFILE=server