F7: Offscreen render capture harness

tools/capture.sh <scene-or-scenario> <out.png> renders the real client
in a throwaway tidewall-capture-* Docker container (debian:13, Xvfb,
Mesa software rendering), with no network, no host display, GPU or
audio, and removes the container afterwards. The tidewall-capture image
rebuilds only when its recipe changes.

Forward+ through Lavapipe is the default, matching the game;
CAPTURE_RENDERER=compatibility uses OpenGL through llvmpipe. The script
fails if Godot silently falls back to another renderer, and fails on a
blank frame, judged by ImageStats (luminance variance and colour count).

make capture-test renders the shore test scene with both renderers and
proves an empty scene is rejected. ImageStats has unit tests in
make check. CLAUDE.md now requires a capture for visual issues, and
requires that it be opened and looked at.

Closes #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 20:13:22 -05:00
co-authored by Claude Opus 5.5
parent d9d4c04312
commit 68635d5fba
16 changed files with 453 additions and 1 deletions
+5 -1
View File
@@ -1,7 +1,7 @@
# Tidewall build entry points. Everything runs headless with the repo-local engine.
GODOT := tools/godot.sh
.PHONY: check import parse test test-selfcheck smoke binaries verify-engine
.PHONY: check import parse test test-selfcheck smoke capture-test binaries verify-engine
## Everything that must pass before a push.
check: verify-engine binaries parse test test-selfcheck smoke
@@ -29,3 +29,7 @@ test-selfcheck: import
## Boots the headless server for 1,000 ticks and checks exit codes, logs and timing.
smoke: import
@tools/smoke.sh
## Renders the capture test scenes in the offscreen container. Needs Docker.
capture-test: import
@tools/capture_selfcheck.sh