Files
Frametop--frametop/scripts/bench-matte.sh
T
DeeJanuzandClaude Opus 5.5 cb417e4fb5 screens: hulls drawn as their grown polygons, cut shaders discard outside, a forearm stub; matte bench
The hull shader ran over each piece's box; a forearm across the panel covered a fraction of
it. Now the polygon grown by the margin and the feather is drawn, and fragments outside a
piece are discarded (no blend). The forearm is a stub toward the elbow (18 cm at the average
hand size, as the capsules' 16 cm): the elbow is a guess and a longer piece costs a bigger
redraw. tests/matte_bench.cpp (scripts/bench-matte.sh) times the composite offline on the GPU,
mesh against capsules, frame by frame in turn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 22:01:04 -06:00

13 lines
812 B
Bash
Executable File

#!/usr/bin/env bash
# The cutout composite's cost on the GPU, offline (screens/tests/matte_bench.cpp): recorded hands
# (ft-handreplay --publish-dump) cut out of a test buffer, the hand-shaped matte against the
# capsules. Shows nothing in the headset; it does use the GPU for a few seconds.
# scripts/bench-matte.sh DUMP [--frames N] [--panel-px W H]
set -euo pipefail
root=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
args=$(printf ' %q' "$@")
"$root/scripts/frame.sh" -C screens "set -e; mkdir -p build/include; . ../scripts/openvr.sh
g++ -std=c++17 -O2 -Wall -Wno-missing-field-initializers -Ibuild/include \$(pkg-config --cflags egl glesv2 gbm libdrm) \
tests/matte_bench.cpp handcut.cpp handrender.cpp -o build/matte-bench \$(pkg-config --libs egl glesv2 gbm) \$OPENVR_LIBS
build/matte-bench$args"