|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
WGSL shader sources used by the Slug rendering pipeline. More...
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Functions | |
| gpu::Result< gpu::ShaderModule > | donner::geode::createSlugFillShader (gpu::Device &device) |
| Compile the Slug fill shader for the given device. | |
| gpu::Result< gpu::ShaderModule > | donner::geode::createSlugGradientShader (gpu::Device &device) |
| Compile the Slug gradient-fill shader for the given device. | |
| gpu::Result< gpu::ShaderModule > | donner::geode::createSlugMaskShader (gpu::Device &device) |
| Compile the path-clip mask shader for the given device. | |
| gpu::Result< gpu::ShaderModule > | donner::geode::createImageBlitShader (gpu::Device &device) |
| Compile the image-blit shader for the given device. | |
| wgpu::ShaderModule | donner::geode::createFilterBlendShader (const wgpu::Device &device) |
| Compile the feBlend compute shader for the given device. | |
WGSL shader sources used by the Slug rendering pipeline.
| wgpu::ShaderModule donner::geode::createFilterBlendShader | ( | const wgpu::Device & | device | ) |
Compile the feBlend compute shader for the given device.
The WGSL source is embedded at build time from shaders/filter_blend.wgsl via the embed_resources() Bazel rule. The shader applies one of 16 W3C Compositing 1 blend modes to two premultiplied-alpha input textures, using the same blend formulas as image_blit.wgsl.
Bind group layout:
| gpu::Result< gpu::ShaderModule > donner::geode::createImageBlitShader | ( | gpu::Device & | device | ) |
Compile the image-blit shader for the given device.
The WGSL source is embedded at build time from shaders/image_blit.wgsl via the embed_resources() Bazel rule. The shader expects:
and no vertex buffer - corners are generated from @builtin(vertex_index).
| device | Donner GPU device (in this transition phase, the wgpu adapter). |
| gpu::Result< gpu::ShaderModule > donner::geode::createSlugFillShader | ( | gpu::Device & | device | ) |
Compile the Slug fill shader for the given device.
The WGSL source is embedded at build time from shaders/slug_fill.wgsl via the embed_resources() Bazel rule. The shader expects:
and vertex attributes:
| device | Donner GPU device (in this transition phase, the wgpu adapter). |
| gpu::Result< gpu::ShaderModule > donner::geode::createSlugGradientShader | ( | gpu::Device & | device | ) |
Compile the Slug gradient-fill shader for the given device.
Parallel to createSlugFillShader, but bound to a different uniform layout that carries linear-gradient parameters (transform, start/end, spread mode, stops) alongside the Slug coverage machinery. See shaders/slug_gradient.wgsl for the exact struct layout.
| device | Donner GPU device (in this transition phase, the wgpu adapter). |
| gpu::Result< gpu::ShaderModule > donner::geode::createSlugMaskShader | ( | gpu::Device & | device | ) |
Compile the path-clip mask shader for the given device.
Same band/curve encoding as createSlugFillShader but the fragment stage writes clip coverage into an RGBA8Unorm target. The uniform layout is reduced to just the mvp matrix, viewport size, and fill rule - no paint mode, no pattern, no clip polygon. Used by the path-clipping pipeline to materialise a per-pixel clip mask texture that subsequent fill / gradient draws sample as a coverage multiplier.
| device | Donner GPU device (in this transition phase, the wgpu adapter). |