|
|
Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
|
Caches a compiled wgpu::RenderPipeline for the path-clip mask shader (shaders/slug_mask.wgsl) plus its bind-group layout. More...
#include "donner/svg/renderer/geode/GeodePipeline.h"
Public Member Functions | |
| GeodeMaskPipeline (const wgpu::Device &device) | |
| Create a Slug mask pipeline for the given device. | |
| GeodeMaskPipeline (const GeodeMaskPipeline &)=delete | |
| GeodeMaskPipeline & | operator= (const GeodeMaskPipeline &)=delete |
| GeodeMaskPipeline (GeodeMaskPipeline &&) noexcept=default | |
| GeodeMaskPipeline & | operator= (GeodeMaskPipeline &&) noexcept=default |
| const wgpu::RenderPipeline & | pipeline () const |
| const wgpu::BindGroupLayout & | bindGroupLayout () const |
| wgpu::TextureFormat | colorFormat () const |
| The color format the pipeline targets. Always RGBA8Unorm. | |
Caches a compiled wgpu::RenderPipeline for the path-clip mask shader (shaders/slug_mask.wgsl) plus its bind-group layout.
The mask pipeline is a stripped-down sibling of GeodePipeline - it reuses the same vertex shader and band/curve storage SSBOs. The fragment stage replicates scalar analytic coverage into an RGBA8Unorm color attachment. The resulting mask texture is then sampled by GeodePipeline and GeodeGradientPipeline as a clip coverage multiplier.
The bind group layout is:
No texture / sampler bindings - the mask pipeline doesn't read from any texture input. Multiple paths belonging to a single clip layer are unioned on the hardware side via BlendOperation::Max.
|
explicit |
Create a Slug mask pipeline for the given device.
Renders into an single-sampled RGBA8Unorm texture.