F3 shows the shader pack's GPU time per pass, for either kind of pack

While the F3 overlay is open, the running pack's passes are timed on the GPU,
a shaders/ pack's or a native pack's, and the overlay lists the pack's total
and its costliest passes (the median of the last 15 timed frames). The timer
never waits: a timed frame's stamps are resolved once the GPU has finished it
and read back once mapped, then the next frame is timed. A native pack's first
pass counts from a mark that ends with the world's draws, so it does not carry
the time it waited for them. HORIZON_SHADER_PACK_TIMING still logs the medians.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-26 05:59:02 +01:00
parent 5bcc87983e
commit c3763ff1b3
9 changed files with 334 additions and 79 deletions
+5 -5
View File
@@ -127,11 +127,11 @@ one keeps drawing), the launcher before it installs one, and the registry's CI b
6. Every entry point translated for Vulkan (SPIR-V), Metal and DirectX 12 (HLSL), with the options at their
defaults, minimums and maximums.
`[budget] gpu_ms` is the GPU time your pack aims to add to a frame; the game's overlay will show each pass's time
against it.
`[budget] gpu_ms` is the GPU time your pack aims to add to a frame. To compare, open F3 in the game: while it is
open, each pass is timed on the GPU and the overlay shows the pack's total and its costliest passes, by their `name`
(the median of the last 15 timed frames). Timing waits for nothing, so it does not slow the game.
## Next
The renderer hooks (shared with the Iris/OptiFine loader), then the post stage in the game with hot reload and the
GPU time per pass, Options > Shader packs listing these packs, then the material and sky stages, and the registry's
`shader` kind with installs from the launcher.
Options > Shader packs listing these packs, then the material and sky stages, and the registry's `shader` kind with
installs from the launcher.