H2: Graphics presets, OpenGL fallback notice, tested configurations
Presets now tune shadows, cascades, render scale and anti-aliasing: Low (no shadows, 75%, FXAA), Medium (200 m, 2 cascades, FXAA), High (400 m, 4 cascades, MSAA 2x). GameSettings.apply_to_viewport sets the viewport; MatchView.apply_settings sets the sun's cascades. No preset changes how far props or pieces are drawn, so a lower one never shows a player through cover; a test guards it. When Vulkan can't start, Godot falls back to OpenGL (fallback_to_opengl3) and RendererCheck has the main menu say so. tools/capture.sh gains CAPTURE_RENDERER=no_vulkan, which hides the Vulkan driver and expects the fallback. New scenarios quality_low/medium/high draw a match moment with each preset, reviewed in both renderers. docs/PLAY.md lists the presets, renderers, Wayland and hybrid-GPU notes, and the tested configurations, marking each as software-rendered only or not tested. Closes #55 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+15
-9
@@ -10,8 +10,10 @@
|
||||
#
|
||||
# Environment:
|
||||
# CAPTURE_SIZE=1280x720 frame size
|
||||
# CAPTURE_RENDERER=forward_plus Vulkan via Lavapipe (default, the shipping renderer), or
|
||||
# compatibility for OpenGL via llvmpipe
|
||||
# CAPTURE_RENDERER=forward_plus Vulkan via Lavapipe (default, the shipping renderer),
|
||||
# compatibility for OpenGL via llvmpipe, or no_vulkan:
|
||||
# asks for Vulkan with no Vulkan driver present, and
|
||||
# expects the game to fall back to OpenGL (H2)
|
||||
#
|
||||
# Exits 0 when the PNG was written and isn't blank (pixel variance and colour count),
|
||||
# 1 when the render failed or came out blank, 2 on bad usage. Open the image and look
|
||||
@@ -49,10 +51,13 @@ fi
|
||||
|
||||
size="${CAPTURE_SIZE:-1280x720}"
|
||||
[[ "$size" =~ ^[0-9]+x[0-9]+$ ]] || { echo "capture.sh: bad CAPTURE_SIZE '$size'" >&2; exit 2; }
|
||||
env_args=()
|
||||
case "${CAPTURE_RENDERER:-forward_plus}" in
|
||||
compatibility) render=(--rendering-method gl_compatibility --rendering-driver opengl3) ;;
|
||||
forward_plus) render=(--rendering-method forward_plus --rendering-driver vulkan) ;;
|
||||
*) echo "capture.sh: CAPTURE_RENDERER must be compatibility or forward_plus" >&2; exit 2 ;;
|
||||
compatibility) render=(--rendering-method gl_compatibility --rendering-driver opengl3); wanted="gl_compatibility" ;;
|
||||
forward_plus) render=(--rendering-method forward_plus --rendering-driver vulkan); wanted="forward_plus" ;;
|
||||
# The project's own renderer (Forward+ on Vulkan), with no Vulkan driver to find.
|
||||
no_vulkan) render=(); env_args=(-e VK_ICD_FILENAMES=/nonexistent/none.json -e VK_DRIVER_FILES=/nonexistent/none.json); wanted="gl_compatibility" ;;
|
||||
*) echo "capture.sh: CAPTURE_RENDERER must be compatibility, forward_plus or no_vulkan" >&2; exit 2 ;;
|
||||
esac
|
||||
|
||||
# Rebuild the image only when its recipe changes.
|
||||
@@ -84,9 +89,10 @@ output="$(timeout --signal=KILL 300 nice -n 15 docker run --rm --name "$name" \
|
||||
--user "$(id -u):$(id -g)" \
|
||||
--memory 3g --cpus 4 \
|
||||
-e "CAPTURE_SCREEN=${size}x24" \
|
||||
"${env_args[@]}" \
|
||||
-v "$repo:/repo" \
|
||||
"$image" \
|
||||
"${render[@]}" --resolution "$size" \
|
||||
${render[@]+"${render[@]}"} --resolution "$size" \
|
||||
--script res://tools/capture.gd -- --scene="$scene" --out="res://$scratch" "${extra[@]}" 2>&1)"
|
||||
code=$?
|
||||
set -e
|
||||
@@ -102,10 +108,10 @@ if [[ -f "$repo/$scratch" ]]; then
|
||||
mv "$repo/$scratch" "$out"
|
||||
fi
|
||||
echo "$report"
|
||||
# Godot silently falls back to OpenGL when Vulkan fails; that is not the requested capture.
|
||||
wanted="${render[1]}"
|
||||
# Godot falls back to OpenGL when Vulkan fails; unless that was the point, it is not the
|
||||
# requested capture.
|
||||
if ! grep -q "\"renderer\":\"$wanted\"" <<<"$report"; then
|
||||
echo "capture.sh: asked for the $wanted renderer, but Godot fell back to another" >&2
|
||||
echo "capture.sh: expected the $wanted renderer, but Godot used another" >&2
|
||||
grep -iE 'vulkan|error' <<<"$output" | tail -n 10 >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user