Effect algorithms and numerical behavior¶
This page preserves the detailed sampling, quantization, resource and glyph contracts behind the effects. For choosing and using a look, start with the visual catalog, processing model and effect contracts. Parameter tables are generated in the parameter reference.
These details describe the current implementation, including fixed-point rounding and resource costs; they are not prerequisites for attaching an effect.
Find the processing contract¶
| Algorithm | Input → processing → output | Detail to verify |
|---|---|---|
| Motion Tile | Sized/cropped RGBA → virtual repeat/mirror sampling → transformed layer. | Negative-coordinate seams, original anchor and alpha. |
| Palette/dither | RGBA → detail, tone, analysis and quantization → palette/channel color blended with original. | Fixed-point ties, palette order, alpha and optional pass costs. |
| Halftone | RGBA → rotated-cell means → antialiased dots with original pixel alpha. | Partial cells, screen membership and dot coverage. |
| PixelSort | RGBA → eligible runs in fixed blocks → stable sorted pixels blended with input. | Threshold endpoints, ties, transparent run breaks and bounded work. |
| CRT | RGBA plus owner-local time/seed → curvature, scanlines, masks and temporal modulation → alpha-aware output. | Sampling lattice, transparent borders and frame-order independence. |
| ASCII | RGBA plus prepared glyph atlas → cell tone/edges → antialiased glyph or geometric coverage. | Grid rounding, glyph failures, atlas limits and alpha intersection. |
Use the generated effect parameters for complete control inventories. The sections below explain the numerical choices and resource behavior behind them; verification maps those choices to the existing checks.
Stages and Motion Tile sampling¶
Effect order and time domains¶
Layer presentation uses two intrinsic effect stages:
Motion Tile is the only pre-transform effect. Other effects execute after the layer transform in declaration order. The public effect list remains one ordered list; the compiler routes each canonical effect to its intrinsic stage. Global post-effects remain post-composition. Their keyframe times use the project span, including explicit background tails and automatic audio extensions. For example, a ten-second explicit project can have one second of visual content and a global brightness keyframe at five seconds. Bounds that need audio probing are checked by preflight; pure validation still rejects malformed tracks without reading media.
The authored order is still the public order. For example, a canonical list
[MotionTile, DirectionalBlur, ChromaticAberration] samples the virtual tiles,
applies the layer transform, then runs Directional Blur followed by Chromatic
Aberration. Masks and track mattes consume that presented result.
Virtual bounds, seams and alpha¶
Numbers must be finite. Stack order is execution order within each intrinsic
stage. Motion Tile is valid only on a clip layer, only one Motion Tile may
appear in a layer stack, and it supports image, video, shape, text, and group
sources. Solid-color, Spectrum2D, and particle-system sources are rejected.
Motion Tile repeats the already-sized/cropped source over a virtual
sampling region while the final output remains the normal composition extent;
it does not allocate an expanded full-frame image. mirror_edges=False repeats
directly and mirror_edges=True alternates mirrored tiles, including negative
virtual coordinates. Sampling uses pixel-center coordinates (n + 0.5): for
each bilinear sample all four neighbors are mapped independently through
Euclidean tile division/remainder; mirrored odd tiles reverse the local offset
with N - 1 - offset. This makes repeat and mirror seams continuous for
negative and positive coordinates alike. Its RGBA samples are copied
together, so transparent source pixels remain transparent. CPU and WGPU use
the same coordinate model.
The canonical form uses each class's snake-case type such as gaussian_blur;
color values are canonical #RRGGBB/#RRGGBBAA.
Palette mapping and dithering¶
The input path is detail → tone → analysis → quantization. Final amount
blends against the retained original. The subsections follow that path and then
specify matching modes, fixed-point rules and animation. Neutral controls skip
their optional work; a larger analysis cell does not imply a smaller texture.
Tonal stops and quantization¶
| Input rule | Contract |
|---|---|
| Tonal palette order | Author dark to light; the palette is not sorted automatically. Default stops are uniformly spaced in encoded RGB luminance. |
| Colors | #RRGGBB or opaque #RRGGBBFF; transparent palette colors are rejected. |
| Alpha | Source alpha remains unchanged, including transparent pixels. |
| Final amount | 0 preserves the source; 1 applies full color mapping. |
stops=None preserves the original uniform mapping byte for byte. For gradient
or nearest, supply one static position per authored color, for example
palette=("#000000", "#ff0000", "#ffffff"), stops=(0, 0.25, 1).
Positions must increase, start at zero and end at one. They are rounded half up
onto the encoded-luminance grid 0..65280; positions that collapse to the same
grid value are rejected. Palette order is retained. Phase/period animate colors
through these fixed positions without moving or sorting the positions.
Custom stops are rejected for rainbow, chromatic matching and channel modes,
whose palettes do not represent authored tonal intervals.
For custom stops, the source key is 54*r + 183*g + 19*b. Locate its surrounding
stop keys; gradient mapping interpolates encoded RGB bytes in that interval,
rounding half up. Nearest mapping chooses the upper color at an exact midpoint.
Dither rounds the local interval fraction half up to 1/4096, blends it with
the nearest choice's probability using strength rounded to 1/4096, and rounds
again. It chooses the upper color when the existing threshold is at least
1-probability. Thus zero strength gives nearest mapping and full strength
preserves the local tonal fraction spatially. Endpoints retain authored bytes;
source alpha remains unchanged.
RGB and Oklab interpolation¶
PaletteInterpolation.RGB (interpolation="rgb", the default) retains encoded
RGB interpolation and the original phase arithmetic. PaletteInterpolation.OKLAB
("oklab") interpolates in the same deterministic Q10 Oklab space used for
perceptual matching. It applies to Palette Map's gradient segments (uniform or
custom stops) and to authored palette color motion in both effects. Dither still
selects discrete evaluated palette colors; nearest modes use interpolation only
for palette motion. Rainbow retains its generated HSV phase behavior, while
Palette Map can interpolate its generated segments in Oklab. Channel quantization
ignores interpolation along with palette/phase.
Oklab interpolation rounds weighted biased Q10 coordinates half up. The inverse
Lab-to-LMS-root matrix uses Q15 coefficients; signed matrix rounding is half away
from zero. Roots use a conservative signed ±1100/1024 arithmetic bound, then
cube to Q16 LMS with the same signed rounding. The inverse linear RGB matrix uses
Q12 coefficients with normalized row sums. Linear RGB channels are clipped to
0..1; each channel selects the nearest entry in the shared 256-entry sRGB decode
table, resolving encoding ties upward. This is channel gamut clipping rather
than chroma-preserving gamut compression. Exact segment endpoints and identical
neighbor colors return authored bytes directly. Phase fractions round to
1/65280 before Oklab mixing; RGB phase evaluation keeps its original arithmetic.
Source alpha and blend amount retain their existing semantics. Integer conversion
can introduce small rounding steps; interpolation adds no passes or textures.
Exposure and gamma¶
input_exposure (default 0, −8 to 8 stops) and input_gamma (default 1,
strictly positive through 8) adjust the signal entering either palette effect.
Both use ordinary bindable scalar properties with local effect time and the same
constraints as ColorAdjust. Each encoded RGB channel is adjusted as
clamp(channel / 255 * 2**exposure, 0, 1)**(1/max(gamma,0.001)) and rounded to a byte before
matching/quantization. Gamma above one lifts midtones; exposure can clip highlights.
This applies to tonal, RGB, hue, Oklab and channel-count modes alike.
An active tone control reuses a ColorAdjust pass with neutral black/white points.
The final amount blends the quantized result against the retained original
image, preserving its alpha and hidden RGB. It does not blend against the adjusted
input. Amount zero remains identity; neutral exposure/gamma retain the legacy
single pass and do not require retained-source resources. An animated or bound
tone property conservatively prepares resources for its active frames. Tone
preparation is opt-in and adds a full-resolution pass and retained image storage.
Detail enhancement and pass costs¶
input_detail (default 0, range 0–4) applies unsharp detail enhancement before
tone response and quantization. input_detail_radius (default 1, range 0–16)
is its Gaussian radius in output pixels, rounded to quarter pixels. Both are
bindable. Start with amount 1.5/radius 1 for fine detail, or amount 0.5/radius
8 for broader local contrast. Amount rounds to Q16 before processing; zero
amount or a radius rounding to zero skips the detail passes.
Detail reuses the existing horizontal/vertical Gaussian and unsharp operations. Its Gaussian profile uses symmetric integer Q16 weights totaling 65536, with the center receiving the normalization remainder. Filtering clamps borders, accumulates premultiplied byte colors and alpha, and rounds upward at half ties. Transparent neighbors contribute no hidden RGB. Legacy standalone Gaussian effects retain their floating-point profile. Unsharp retains original alpha; the final palette amount still blends against the original image.
Active detail adds three full-resolution passes: four including quantization, or five with active tone. These controls are opt-in; animated/bound properties conservatively reserve their resources.
Input analysis cells¶
input_scale (default 1, range 1–256 output pixels) is bindable and rounds
to an integer square-cell span. It controls analysis independently of dither
threshold scale. The lattice is anchored at output (0,0); partial right/bottom
cells use their actual in-bounds extent. Scale 1 preserves the legacy input
for every filter. Analysis runs after detail and tone, before quantization.
input_filter is static: "area" (default), "nearest" or "linear". Nearest
selects the cell-center pixel, choosing the right/bottom pixel at even-span ties.
Linear samples the geometric center using alpha-aware bilinear averaging; area
uses alpha-weighted means over all covered pixels. Encoded-byte means round
half up; hidden transparent RGB contributes nothing, and fully transparent
analysis cells produce zero RGBA. Final amount blending still uses the original
pixel RGB/alpha, independently of analysis-cell alpha.
Active analysis adds one pass using a sparse cell representative in an existing full-resolution temporary surface. A coarser lattice does not reduce physical texture storage. Animated/bound scale conservatively reserves analysis resources.
Tonal modes and threshold patterns¶
PaletteMode.GRADIENT interpolates adjacent palette stops and
PaletteMode.NEAREST chooses the nearest tonal stop. PaletteMode.RAINBOW
generates a 16-stop hue ramp with increasing brightness. Ordered Dither always
selects discrete tonal stops: its gradient and nearest modes use the same
ordered thresholds, while rainbow dithers the generated hue ramp. Changing
an authored palette of the same length leaves the threshold pattern unchanged.
DitherMatrix.BAYER2, .BAYER4, and .BAYER8 choose its repeating ordered
matrix. scale=1 preserves fine source detail; larger values enlarge the
pattern. DitherMatrix.BLUE_NOISE selects an original, toroidally seamless
32×32 void-and-cluster rank tile with 1024 distinct thresholds. It stays fixed
in output pixels, independent of source motion, frame order or palette colors.
seed=0 uses the original orientation. First fold the unsigned seed with
seed ^ (seed >> 13) ^ (seed >> 26); bits 0..4 and 5..9 shift the x/y origin,
bit 10 swaps axes, and bits 11/12 reflect x/y. All authored bits participate in the fold. Seeds can alias; they select tile transforms,
not independent random textures. Bayer ignores seed. scale enlarges either
pattern, independently of source analysis. Neither mode allocates frame-sized
pattern resources or reads frames back to the CPU. The tile can be reproduced
with uv run --no-project python scripts/generate-blue-noise.py; the generator
checks threshold coverage and low-frequency suppression at five tone cutoffs.
strength=0 gives ordinary nearest-stop quantization.
RGB and hue matching¶
PaletteMode.NEAREST_RGB (nearest_rgb) selects the authored color with the
smallest squared distance in encoded RGB byte space. PaletteMode.NEAREST_HUE
(nearest_hue) uses integer HSV distance. These modes accept arbitrary color
order, preserve exact palette colors, and resolve equal distances to the first
authored entry. Neither mode performs linear-light or perceptual conversion.
The integer HSV distance is computed as follows:
- Value is the maximum channel. Saturation is
floor(255 * (max-min) / max), or zero for gray. - Hue uses a wrapped 1530-step circle. Its sectors are
255*(g-b)/range,510+255*(b-r)/range, or1020+255*(r-g)/rangefor a maximum red, green or blue channel respectively. Signed division truncates toward zero. - The hue-distance component is the shortest wrapped difference divided by three, multiplied by the smaller saturation and divided by 255. Each division truncates. Sum squared hue, saturation and value differences.
Hue therefore has no influence when either color is gray. Colors stay within byte gamut.
In these two chromatic modes, Ordered Dither chooses the two nearest palette
entries. If their squared distances are d0 <= d1, the second entry's probability
is d0 / (d0+d1), or zero when both distances are zero. Probability and strength
are rounded half up to 1/4096, multiplied and rounded to the same precision,
then compared with the existing matrix threshold. At zero strength it always
chooses the nearest entry; increasing strength blends the pair spatially.
Palette Map always chooses the nearest entry. Source alpha and transparent
pixels retain the same policy as the legacy modes.
Fixed-point Oklab matching¶
PaletteMode.NEAREST_OKLAB (nearest_oklab) matches an arbitrary authored
palette by squared Euclidean distance in a deterministic integer approximation
of Oklab.
| Conversion stage | Numerical rule |
|---|---|
| Decode encoded RGB as sRGB/D65 | Standard sRGB transfer to Q16 linear values, rounded half up. The 256-entry table is generated at 60-decimal precision. |
| Linear-sRGB matrix | Q15 coefficients; adjust each row's largest absolute coefficient to preserve its sum (one for LMS/lightness, zero for chroma). |
| LMS and cube root | Round LMS sums half up to Q16; use integer binary search for Q10 cube roots. |
| Final Lab matrix | Round ties away from zero. Coordinates have 1/1024 resolution; a/b storage bias of 512 cancels in distances. |
| Select output | Authored opaque palette bytes in authored order, with source alpha preserved; no inverse conversion or gamut mapping is needed. |
An exact RGB palette match takes precedence over feature-distance ties, so
nearby colors that share rounded Lab coordinates still preserve their exact
authored bytes. Other ties choose the first entry. Ordered Dither uses the same
two-nearest, Q12 inverse-squared-distance probability as the RGB/hue modes;
64-bit CPU arithmetic and bounded WGSL long division avoid intermediate
overflow. This is a documented fixed-point approximation, not a full-precision
color-management conversion. Reproduce its shared Rust/WGSL constants with
uv run --no-project python scripts/generate-oklab.py.
Per-channel quantization¶
PaletteMode.RGB_CHANNELS (rgb_channels) quantizes encoded R, G and B
independently to levels=4 uniformly spaced values per channel. levels is a
static integer from 2 through 256; it is ignored by the other modes. Palette,
phase and period do not affect channel quantization, but still obey their normal
validation rules. At 256 levels the full-strength effect preserves source RGB
exactly. Source alpha and transparent pixels remain unchanged.
For channel byte c and n=levels-1, compute position=c*n, integer
lower=position/255 and fraction=position%255. Palette Map chooses the nearest
index, rounding up when fraction>=128. Ordered Dither rounds fraction/255
half up to 1/4096 and blends that probability with the nearest index's probability
(zero or one), using dither strength rounded to 1/4096. A threshold below that
probability chooses the upper index; otherwise it chooses the lower. The final
channel byte is round_half_up(255*index/n). All three channels share the same
spatial rank. This preserves average channel tone at full dither strength and
provides ordinary nearest-channel quantization at zero strength.
Phase, periods and animation¶
phase rotates colors smoothly in cycles without moving the spatial pattern.
When period is supplied, core adds local_time / period to the authored phase
and wraps the result. Layer effects use composition-local layer time; global
effects use composition time. The procedural color phase repeats after one
period when keyframes/signals are unchanged; source footage and audio do not
become loops. amount, phase, and dither strength accept keyframes and
signal bindings. Palette, mode, matrix, scale, seed, and period are static controls.
levels is also a static control. Advanced authoring exposes add_palette_map and add_ordered_dither on clip
and post-effect collections, plus the generic descriptor-backed add_effect.
Halftone cell analysis¶
Halftone (halftone) converts cell tone into dot coverage after the layer
transform.
| Control | Default | Units or accepted values |
|---|---|---|
mode |
"luminance" |
"luminance", "source", "rgb". |
cell_size |
6 |
2–64 output pixels. |
angle_degrees |
15 |
Finite degrees. |
softness |
0.5 |
0–2 output pixels. |
foreground, background |
"#ffffff", "#000000" |
Opaque colors. |
invert, amount |
False, 1 |
Boolean; amount in [0, 1]. |
Continuous numeric controls are bindable scalar properties.
- Anchor the rotated lattice at the composition canvas origin. RGB mode adds fixed 60-degree offsets between its screens.
- Average all actual pixel centers in each cell, including clipped border cells. Means are alpha-weighted; fully transparent RGB contributes nothing.
- Store byte-quantized means in a bounded analysis temporary.
- Resolve antialiased dots with the original pixel alpha. No blur pass or frame history is used.
Cell membership and dot geometry¶
Cell membership uses
shared Q16 lattice coefficients and integer pixel-center coordinates, preventing
GPU fused floating-point arithmetic from changing diagonal boundary ties. Cell
size and direction coefficients use 16 fractional bits; antialiased dots remain
floating-point geometry. Dot radius
is proportional to the square root of tone and reaches cell corners at white.
softness=0 preserves intentionally hard print geometry; positive softness
smooths dot coverage analytically. Continuous cell-size/angle changes move the
lattice; membership changes remain stateless and discrete at pixel boundaries.
Bounded sorting¶
PixelSort (pixel_sort) sorts bounded runs rather than the entire frame.
| Control | Default | Units or accepted values |
|---|---|---|
direction |
"horizontal" |
"horizontal" or "vertical". |
order |
"ascending" |
"ascending" or "descending". |
lower_threshold, upper_threshold |
0.15, 0.9 |
Bindable [0, 1]. |
segment_length |
64 |
Integer 2–256 pixels. |
amount |
1 |
Bindable [0, 1]. |
- Divide each row/column into fixed blocks starting at pixel zero. Bound the final partial block to its actual extent.
- Find contiguous eligible runs. Threshold endpoints are included; alpha-zero and ineligible pixels break runs.
- Sort complete RGBA pixels by
54*R + 183*G + 19*B, preserving original order for equal integer luminance in either sort direction. - Blend source and sorted pixels by
amountin premultiplied space.
Authored reversed thresholds are invalid; crossing evaluated thresholds selects no pixels. Sorting keeps sharp edges intentionally; threshold crossings may create deliberate glitch motion. The GPU sorts up to 256 pixels with 64 lanes and 7 KiB shared memory, without a GPU readback or whole-frame staging allocation.
CRT sampling and temporal behavior¶
Crt (crt) samples the source through an inverse curved screen, then applies
pixel-anchored screen patterns and continuous procedural modulation.
| Control | Default | Units or accepted range |
|---|---|---|
amount, curvature |
1, 0.08 |
[0, 1]; [0, 0.5]. |
scanline_strength, scanline_spacing |
0.2, 2 |
[0, 1]; 1–8 output pixels. |
mask_strength, mask_spacing |
0.15, 1 |
[0, 1]; integer 1–6 output pixels. |
grain, jitter, flicker |
0.025, 0.35, 0.025 |
[0, 0.25]; 0–8 pixels; [0, 0.25]. |
rolling_strength, rolling_width |
0.06, 0.12 |
[0, 1]; 0.01–1 of canvas height. |
phase, period, seed |
0, None, 0 |
Finite cycles; optional positive finite seconds; unsigned 64-bit integer. |
All numeric controls except mask spacing, period and seed are bindable.
Sampling, alpha and procedural time¶
Inverse-curvature sampling is alpha-aware. CPU and WGPU use shared Q15
normalized coordinates and curvature, then a 1/256-pixel sampling lattice.
Zero curvature preserves exact pixel centers; jitter coefficients are prepared
once per frame. Integer arithmetic stays bounded at the 8192-pixel canvas limit. Antialiased borders may become transparent; pixels whose final byte
alpha is zero have zero RGB. Scanlines are pixel-footprint integrated and
anchored at the first output-row center. Phosphor masks are fixed output-pixel
stripes. Grain/jitter
use fixed seeded sine/cosine coefficients, continuous owner-local time and no
frame counter. period repeats the procedural component, independently of the
source, audio or other animation. Modulo phase evaluation supports negative or
large finite phases without shader overflow. Intensity blends in premultiplied
space. Scanlines, masks and grain never create source alpha.
Attachment and editable recipes¶
These effects support layers, groups and global post effects, with authored
order preserved. Static enum/color/integer settings change discretely; animate
amount for a source-to-look transition. Optional recipes in
vestra.effects.recipes return fresh ordinary effect chains rather than image
presets: halftone_print(), analog_monitor(period=...), and
sorted_neon(direction=...). Their individual effects remain editable.
ASCII and pseudo-ASCII¶
Ascii / ascii runs after the layer transform, or after composition as a
global effect. PseudoAscii is a Python convenience selecting
glyph_style="geometric"; it uses the same cell analysis, color and alpha
semantics with antialiased density-ranked dots, lines and crosses.
The v1 JSON contract has a preserved legacy inconsistency: the schema marks
glyph_style, mode and color_mode optional with defaults, but the Rust parser
requires all three fields. Include them explicitly in canonical JSON. Python
authoring supplies them. Compatibility tests assert both the schema's acceptance
of each omission and the parser's corresponding missing-field error; generation
does not reconcile this mismatch.
Controls and canonical JSON¶
| Control | Python default | Contract |
|---|---|---|
characters |
" .:-=+*#%@" |
1–256 independent Unicode scalars, authored dark-to-light order; duplicates retain intentional density weighting. CHARACTER_SETS provides standard, dense and blocks strings. |
edge_characters |
"-\|/\\" |
Exactly four scalars: horizontal, vertical, slash, backslash. |
font |
None |
Bundled DejaVu-derived regular face. Python accepts a font path; canonical JSON references a registered Font asset ID. |
cell_width, cell_height |
8, 12 |
Bindable pixel sizes in 2..64 and 2..128, rounded once in core. |
mode |
"hybrid" |
fill, edges, hybrid. |
glyph_style |
"characters" |
characters, geometric. |
color_mode |
"monochrome" |
monochrome, alpha-weighted cell source, palette, rainbow. |
foreground, background |
white, opaque black | Valid RGBA colors; transparent backgrounds are supported. |
palette |
black/white | 2–16 opaque authored colors; shared animated palette semantics. |
invert |
False |
Reverse analyzed tone before density/color selection. |
edge_threshold, edge_strength |
.15, 1 |
Bindable 0..1 and 0..4; strength saturates final coverage. |
source_mix, amount |
0, 1 |
Bindable 0..1; mix original and styled output in premultiplied space. Either amount=0 or source_mix=1 preserves the input. |
phase, period |
0, None |
Bindable finite phase in cycles; optional static positive finite period in owner-local seconds. Palette/rainbow motion repeats deterministically. |
Cell coordinates and coverage¶
Cell dimensions evaluate to whole pixels, rounded to the nearest integer
before either renderer runs. Keyframes and signals therefore resize the grid
in discrete one-pixel steps; cell sizing is not a continuously interpolated
geometry control. Use amount or source_mix fades around deliberate grid
changes when a smooth transition is desired.
The cell grid is anchored at the current composition canvas origin. Pixel
centers are (x+.5, y+.5); transforms move footage through this fixed grid,
rather than moving the glyph lattice. Each cell visits its actual covered
pixels, including partial border cells, and ignores hidden RGB when alpha is
zero. RGB means and half-cell luminance means use alpha weighting. Those
region averages prefilter thin/noisy content without a separate full-frame
blur or a noisy single-pixel character decision. Entirely transparent cells
produce no visible support. The final styled alpha is intersected with each
original pixel's alpha.
Density selection crossfades neighboring character coverage only within a narrow one-eighth interval around a density threshold. This is stateless: random-access frame requests produce the same result. Edge selection uses area-filtered horizontal/vertical luminance gradients, deterministic four-way orientation bins and a smooth threshold band. Coverage stays antialiased; source pixels and other intentionally crisp effects remain unchanged.
Glyph preparation and resources¶
Glyphs are prepared once in fixed 32×48 tiles on 16 columns, with a common baseline, and shared by CPU/WGPU. A five-level area-filtered coverage pyramid reaches 2×3 tiles so small cells retain fine strokes. The largest atlas (256 fill and four edge glyphs) is 512×816, approximately 2.13 MiB including the pyramid. Preparation validates source-pixel, per-asset and aggregate decoded byte limits; WGPU validates atlas dimensions against the adapter before upload. Cell-size/keyframe animation reuses these resources without font rebuilds or GPU readbacks. Two packed RGBA8 cell metadata texels use an existing temporary surface; resolve samples the retained original and prepared atlas.
Font scope and failures¶
Fonts use their first face, independent scalars, and no system fallback,
ligatures, grapheme, bidirectional or contextual shaping. Missing/control or
invisible non-space glyphs fail preparation with VESTRA-ASCII-GLYPH diagnostics.
The fixed glyph tile must contain the rasterized glyph; a font/glyph outside
that rasterization scope fails explicitly. Relative custom font paths resolve
against the project's base directory. High-level Python registers and shares
font assets across clip/global effects, transition presentations and owned
mask Group child effects. Canonical transition font fields use Font asset
IDs; missing or wrong-kind assets report the effect's /font validation path.
The bundled font's complete notice is
in DejaVuSans.txt.
Configuration changes and examples¶
Enums, glyph strings/font and palette cardinality are discrete configurations.
Animate amount or source_mix for useful continuous transitions; no implicit
crossfade of incompatible font or character configurations is promised.
See the ASCII JSON example,
pseudo-ASCII example, and
looping showcase.
Verification¶
Start with effect checks; add rendered specimens for the numerical or resource rule you change. Preserve the distinction between structural coverage and actual image evidence.
| Changed rule | Evidence to collect |
|---|---|
| Defaults, bounds, scopes or serialization | Core validation/compilation specimens, schema freshness and Python compatibility checks. |
| Sampling, rounding or alpha | CPU pixel regressions, including transparent hidden RGB, partial cells/borders and identity settings. |
| WGSL records, passes or resources | Adapter-free registration/layout/plan checks, then actual WGPU frames. Parsing a shader does not verify its pixels. |
| Time, phase or seed | Same frame requested in different orders, period endpoints and keyframe/signal cases. |
| Backend parity | Compare CPU and WGPU frames with the documented tolerance; record adapter, API and driver. |
| Cost or retained resources | Representative performance measurements, including active optional passes and repeated prepared-state reuse. |
Use GPU validation for software and hardware procedures. Software WGPU proves only that path's correctness; unavailable hardware checks remain unverified. The support matrix records the current evidence and limits.