Expand description
Final blend pipeline: composites primary + secondary chain outputs into the renderer’s display texture.
When no transition is active (secondary == None), the pass behaves as
a passthrough of primary.final_texture. When a transition is in
flight, it samples both chains’ final_texture and lerps them by
progress:
display.rgb = mix(secondary.rgb, primary.rgb, progress)progress is the Transition::progress
eased value in [0, 1]. At progress = 0 the display shows the old
preset (the secondary chain, fading out); at progress = 1 the new one
(primary, fading in). The eased curve is fed straight from
[onedrop_engine::transition].
Cost when no transition is in flight: one fullscreen triangle on a single sampled texture (~0.1 ms at 1080p on a modern GPU). The fallback 1×1 secondary view keeps the bind group layout uniform across both states so we never rebuild the pipeline mid-frame.
Structs§
- Blend
Uniforms - Per-pass uniforms:
progressis the eased transition value in[0, 1];has_secondaryis1when a secondary chain is active,0otherwise — keeps the shader from sampling the fallback texture for nothing. - Final
Blend Pipeline - Owns the blend pipeline, its bind group, the per-frame uniform buffer, and the display target it writes into. Created once at renderer init and never reallocated; only the bind group is rebuilt when a secondary chain is added or removed.
Constants§
- SHADER 🔒