Keep each mod model's last rendered world transform and emit a separate previous-position vertex stream. A depth-read-only motion pass overwrites camera-only vectors with exact previous-frame object motion and matching alpha cutouts. Add HORIZON_HD_DEBUG_MOTION for visual verification.
Co-Authored-By: Kimi Code <noreply@moonshot.ai>
The near colour-shadow pass leaves leaves out of depth while the far cascade includes them. Blend both filters over six blocks and fade tint on the same curve so the boundary no longer reads as a circle around the camera.
Co-Authored-By: Kimi Code <noreply@moonshot.ai>
Add an RG16F current-to-previous render-pixel target to the HD G-buffer. Terrain and entities write previous drawn-camera projections; TAA/TAAU use matching opaque vectors and retain the depth fallback elsewhere. Object-local previous transforms and vendor SDK evaluation remain separate phases.
Co-Authored-By: Kimi Code <noreply@moonshot.ai>
Uploads staged every buffer write through wgpu's StagingBelt, which gives a
write larger than its chunk a buffer of exactly that size, keeps it for good
and only reuses it for writes that fit. The entity batch outgrows the 1 MiB
chunk with a few hundred mobs and grows a little each tick while more appear,
so every tick took a new buffer: about 1 GB more per hundred mobs past ~750,
never given back, until the game was killed (upstream #2826).
Writes larger than the chunk now take a power-of-two slice and copy only
their bytes, so the buffers the belt keeps are reused: one per doubling.
Backport of horizon-rust/horizon@f7b77fbc88,
whose file moved from crates/horizon-client-render/src/gfx/upload.rs to
crates/horizon-client/src/gfx/upload.rs. Takes its growth test
(growing_large_writes_reuse_the_belt_buffers) and the kept_buffers helper as
written. Fork issue: #130.
Co-Authored-By: Kimi Code <noreply@moonshot.cn>
A camera shown only as the screen's own view was never prepared: the note
required a non-empty picture list. Two runs picking the same local id both
claimed the screen's frame, though only the first one's camera was drawn
from it. The client now notes whether the frame was a world frame and the
(run, camera id) the screen's world was drawn from, so the main-view
milestone belongs to the run whose selection the screen used, and a title
or loading frame reports the path off without erasing earlier milestones.
A world transition clears the submission, the main-view selection and the
milestones: another world's cameras are not drawn. A camera given to
set-main-view drops its picture target, so its milestone starts over until
a frame is drawn from it. prepared stays a host-side encoding milestone,
not target registration, not a GPU fence, not a visible pixel.
Also gate the client's note on the `mods` feature: without it the default
horizon-client build did not compile.
Verified: horizon-mods 37 unit, 44 sandbox (1 ignored; real Wasmtime
guests, the two-run test shows each id 7 follows only its own pictures and
selection) and 4 api_reference; client checks and build with and without
`mods`; gfx lib tests.
Co-Authored-By: Kimi Code <noreply@moonshot.cn>
API 30 adds render.camera-status: availability, the last noted frame's
mod-camera picture path, the calling run's accepted set-views submission
for this world generation, and per-camera prepared flags. A camera is
prepared when the renderer encoded its picture into the texture target
in a real frame of this generation, or a world frame rendered from it as
the set-main-view selection: a host-side encoding milestone, not target
registration, not a GPU fence, not a visible pixel. An empty set-views
clears the request; a resubmission, world transition or mod reload waits
for a new frame. The renderer reports the pictures it drew each frame;
the game notes the frame after a successful render. Verified with two
real Wasmtime guests sharing local camera id 7: each run's readiness
follows only its own submission and main-view choice, and a world
transition resets both.
Co-Authored-By: Kimi Code <noreply@moonshot.cn>
The writer removed its video, raw sound and log only when a take was
cancelled, so an encoder error or a non-zero ffmpeg exit left them in the
films folder. A failed take now removes exactly the files it wrote; the
log's last lines move into the error, since the log itself goes.
The encoder always writes <name>.video.mp4, and <name>.mp4 appears only
after a successful mux or rename. A failed, cancelled or no-audio take
therefore cannot overwrite or delete a film of an earlier export with the
same name. The writer's entry point takes the ffmpeg and its arguments so
a test can drive a failing encoder.
Co-Authored-By: Kimi Code <noreply@moonshot.ai>
Preserve AirDef replay lighting and acoustic commands while retaining upstream shadow and HDR fixes. Give the two entity shadow shaders distinct entry points.
Co-Authored-By: Codex <noreply@openai.com>