Crafter.Graphics/shaders
catbot 225556532a perf(ui): skip the destination read-modify-write on empty tiles (#127)
The standalone per-category UI shaders (quads/circles/images/text)
unconditionally imageLoad the destination pixel up front and imageStore
it at the end, paying a full read-modify-write even on tiles no item
touches — the common case for a sparse UI. The fused uber-kernel already
amortizes a single load/store across all four categories; the standalone
Dispatch* path has no such umbrella.

Defer the imageLoad to just before the first surviving blend (`loaded`
flag) and skip the imageStore unless something was actually blended.
Output is bit-identical: before the first blend `dst` is unused, and a
skipped store leaves the pixel exactly as a no-op load+store would have
rewritten it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 13:26:32 +00:00
..
ui-circles.comp.glsl perf(ui): skip the destination read-modify-write on empty tiles (#127) 2026-06-18 13:26:32 +00:00
ui-fused.comp.glsl Merge remote-tracking branch 'origin/master' into claude/issue-47 2026-06-16 17:09:06 +00:00
ui-images.comp.glsl perf(ui): skip the destination read-modify-write on empty tiles (#127) 2026-06-18 13:26:32 +00:00
ui-quads.comp.glsl perf(ui): skip the destination read-modify-write on empty tiles (#127) 2026-06-18 13:26:32 +00:00
ui-shared.glsl Merge remote-tracking branch 'origin/master' into claude/issue-47 2026-06-16 17:09:06 +00:00
ui-text.comp.glsl perf(ui): skip the destination read-modify-write on empty tiles (#127) 2026-06-18 13:26:32 +00:00