import { d } from './index'; /** * Arc-length/perpendicular decomposition of a point against segment A→B, all in the same * (aspect-corrected) space: returns `vec3(t, perp, len)` — the UNCLAMPED arc length from A, the * degenerate-safe perpendicular distance (recovered from the clamped-projection distance as * `sqrt(dSeg² − overshoot²)`, which stays correct when A≈B where the cross-product form * degenerates to 0 everywhere), and the EPS-guarded segment length. */ export declare const segmentArcPerp: import('typegpu').TgpuFn<(p: d.Vec2f, a: d.Vec2f, b: d.Vec2f) => d.Vec3f>; /** * Line segment coverage mask with per-end square/rounded caps and endpoint-aligned dash/dot * patterns. * * Aspect-correct the UV (distances are then in units of canvas height), recover the authored * endpoint y's (transformPosition stores (x, 1-y) — the Twirl double-flip), then decompose the * pixel against the segment into arc length `t` from A and perpendicular distance `perp`. `perp` * is reconstructed from the clamped-projection segment distance (sqrt(dSeg² − overshoot²)) so it * stays correct when A≈B, where the cross-product form degenerates to 0 everywhere. * * All three styles reduce to one "element" formulation: a signed along-axis offset `c` from the * nearest element's center (solid = the whole segment; dashed/dotted = the nearest cell, with the * cell INDEX clamped to [first, last] so the repeating pattern needs no separate trim pass) plus a * core half-length per cap shape. Rounded caps are capsules (solid caps center on the endpoints, * dash caps are inscribed so a dash stays exactly dashLength long); square caps are boxes ending * flat at the element bounds. `capStart` shapes the A-facing side of every element and `capEnd` * the B-facing side — so square caps also square off dashes and dots. Dash/dot periods are * rescaled so the pattern lands exactly on both endpoints (design-tool endpoint alignment, which * plain SVG dashing doesn't give you). `style` and the caps arrive as runtime mode numbers * (solid 0 / dashed 1 / dotted 2; square 0 / rounded 1). Pure math — CPU-executable for tests. */ export declare const lineMask: import('typegpu').TgpuFn<(uv: d.Vec2f, viewport: d.Vec2f, pointA: d.Vec2f, pointB: d.Vec2f, thickness: d.F32, style: d.F32, dashLength: d.F32, gapLength: d.F32, capStart: d.F32, capEnd: d.F32) => d.F32>; /** * Animated sine-wave coverage mask. * * Aspect-correct the UV, centre on `position` (transformPosition stores (x, 1-y) so * `1 - position.y` recovers the authored y — the Twirl double-flip), rotate by `angle`, then * measure the perpendicular distance to the traveling sine and soft-band it by * thickness/softness. `animTime` is the per-node accumulated time. Pure trig — CPU-executable * for tests. */ export declare const sineWaveMask: import('typegpu').TgpuFn<(uv: d.Vec2f, viewport: d.Vec2f, angle: d.F32, position: d.Vec2f, frequency: d.F32, amplitude: d.F32, thickness: d.F32, softness: d.F32, animTime: d.F32) => d.F32>; /** The shared per-pixel frame every flare artifact reads. */ export declare const FlareFrame: d.WgslStruct<{ aspect: d.F32; lightPos: d.Vec2f; flareAxis: d.Vec2f; masterFade: d.F32; lightDist: d.F32; lightAngle: d.F32; }>; /** * The flare's shared frame: unflip the light position (a transformPosition prop), aim the flare * axis at the frame centre, and fold the shimmer (three detuned sines) and the edge fade into one * master fade. `lightDist`/`lightAngle` are the aspect-corrected polar coordinates of the pixel * about the light. */ export declare const flareFrame: import('typegpu').TgpuFn<(uv: d.Vec2f, viewport: d.Vec2f, t: d.F32, lightPosRaw: d.Vec2f, intensity: d.F32, edgeFade: d.F32) => d.WgslStruct<{ aspect: d.F32; lightPos: d.Vec2f; flareAxis: d.Vec2f; masterFade: d.F32; lightDist: d.F32; lightAngle: d.F32; }>>; /** * One internal-reflection ghost disc + prismatic edge ring. Config (offset/size/bright/hollow + * tint r/g/b/gPhase) is baked per-call so the ghost table unrolls at the call site (a JS array * can't index inside a body). `disc`/`tint` ride vec4 bundles; the shared spread/chroma/intensity * arrive as scalars. */ export declare const lensFlareGhost: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, lightPos: d.Vec2f, flareAxis: d.Vec2f, t: d.F32, ghostSpread: d.F32, ghostChroma: d.F32, ghostInt: d.F32, disc: d.Vec4f, tint: d.Vec4f) => d.Vec3f>; /** * The halo ring: chromatic dispersion about the anti-light point (the light position mirrored * through the frame centre), with a slow angular brightness variation so the ring reads as glass * rather than a drawn circle. */ export declare const flareHalo: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, lightPos: d.Vec2f, t: d.F32, haloInt: d.F32, haloRad: d.F32, haloChroma: d.F32, haloSoft: d.F32) => d.Vec3f>; /** * The diffraction starburst about the light: two spike sets at different powers, the secondary * offset a little in angle — that pairing is what makes diffraction spikes read as glass rather * than as a star primitive. Spikes rotate slowly with the flare axis + time and tint faintly * through the spectral rainbow. */ export declare const flareStarburst: import('typegpu').TgpuFn<(lightAngle: d.F32, flareAxis: d.Vec2f, aspect: d.F32, t: d.F32, lightDist: d.F32, starburstPts: d.F32, starburstInt: d.F32) => d.Vec3f>; /** * The anamorphic streak: a horizontal bar through the light with per-channel extents (blue * spreads furthest — the cyan-edged widescreen streak), fading fast vertically. */ export declare const flareStreak: import('typegpu').TgpuFn<(uv: d.Vec2f, lightPos: d.Vec2f, streakLen: d.F32, streakInt: d.F32) => d.Vec3f>; /** Veiling glare: a warm-white Gaussian wash about the light that lifts contrast around it. */ export declare const flareGlare: import('typegpu').TgpuFn<(lightDist: d.F32, glareSz: d.F32, glareInt: d.F32) => d.Vec3f>; /** * The bright core: a soft exponential glow plus a hard pinpoint. * NOT lightfields.radialGaussianFalloff: this is spelled `-500·d·d`, which groups its multiplies * differently from the primitive's `-(d·d·k)`. Same value in exact arithmetic, but the rounding * order differs, so swapping it would be a sub-ULP pixel change rather than a provable no-op. */ export declare const flareCore: import('typegpu').TgpuFn<(lightDist: d.F32, intensity: d.F32) => d.Vec3f>; /** Scale the summed flare light by the master fade and derive alpha from its luminance. */ export declare const flareComposite: import('typegpu').TgpuFn<(flareTotal: d.Vec3f, masterFade: d.F32) => d.Vec4f>; //# sourceMappingURL=shapePaints.d.ts.map