Files
benilla-octo/crates
gromandClaude Opus 5 fc63dd022a ui_pass: a resized image re-prepares the materials that sample it
A booth pane's render target is resized between 256 and 512 as the pane it
is lent to changes size, and `GpuImage::prepare_asset` builds a brand-new
texture and view every time it runs. Nothing re-prepares a material because
an image it names changed — `PreparedMaterial2d` prepares from its own asset
events alone — so the UI's cached quad material went on holding the dead
view and sampled a texture nothing rendered into any more.

That is what "the preview is frozen" was: the first window to claim a slot
bound a live texture and every later one bound a corpse, while the camera
kept rendering and the bakes kept restaging into the texture that was no
longer on screen. The cards never froze because a 256 card never resizes
its slot; the big previews, which are the only panes that ask for 512, froze
every time.

`rebuild_ui_mesh` already hears the image stream for removals. It now also
hears `Modified` and touches every cached material naming that image, which
re-extracts it and rebuilds the bind group against the image's current view.
Only the two resize sites emit this event, so a steady frame does no work.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
2026-10-16 07:23:18 -06:00
..