|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
The complete solid-fill (Slug analytic dual-ray) pipeline program as shader IR. More...
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Functions | |
| ShaderResult< IrModule > | donner::gpu::shader::programs::BuildSolidFillModule () |
| Builds the complete solid-fill IR module: a faithful semantic re-expression of the Donner-owned donner/svg/renderer/geode/shaders/slug_fill.wgsl (the analytic dual-ray coverage algorithm). | |
The complete solid-fill (Slug analytic dual-ray) pipeline program as shader IR.
| ShaderResult< IrModule > donner::gpu::shader::programs::BuildSolidFillModule | ( | ) |
Builds the complete solid-fill IR module: a faithful semantic re-expression of the Donner-owned donner/svg/renderer/geode/shaders/slug_fill.wgsl (the analytic dual-ray coverage algorithm).
Contents mirror the WGSL shader function by function: the 352-byte Uniforms struct, Band (32 bytes) and InstanceTransform (32 bytes) storage layouts, all 12 bindings at group 0 with identical binding numbers, the kNoBand sentinel constant, the vs_main vertex stage (per-instance matrix construction, the convex bounding fan expanded from vertex_index, and its per-edge half-pixel dilation with both AABB fallbacks), and the fs_main fragment stage (dense band-grid lookup, accumulateHoriz/accumulateVert analytic ray coverage with owns_axis_sample and the Citardauq-form solve_quadratic, calc_coverage blending, non-zero and even-odd fill rules, convex clip-polygon planes, clip-mask coverage, and the solid premultiplied color and repeat-tiled pattern paint paths).
Entry points are named vs_main / fs_main; struct-typed WGSL stage IO is flattened to annotated parameters/outputs with identical locations and builtins, and .rgba swizzles are transliterated to .xyzw. The Metal vertical slice compares pixels against a frozen baseline rendered by the original WGSL shader, so behavior-affecting constructs must remain semantically identical.