Expand description
Advanced (Tier C) blend modes โ implemented as offscreen filter passes that sample backdrop + foreground and run a per-mode blend function in the fragment shader.
The shared template lives at shaders/advanced_blend.wgsl. For each
advanced BlendMode, blend_fn_body returns the per-mode
blend_fn(base, blend) -> vec3<f32> snippet that gets substituted
into the template before pipeline compilation.
AdvancedBlendPipelines pre-builds one pipeline per advanced mode
at construction time. AdvancedBlendPipelines::apply runs the right one.
Structsยง
- Advanced
Blend ๐Pipelines - Cache of one [
wgpu::RenderPipeline] per advancedBlendMode.
Constantsยง
- PLACEHOLDER ๐
- TEMPLATE ๐
Functionsยง
- blend_
fn_ ๐body - Per-mode
blend_fn(base: vec3<f32>, blend: vec3<f32>) -> vec3<f32>.