import { d } from './index'; import { Expr } from '../contract'; /** * Reflect a screen UV across the mirror line through `center` at `angle`. * * Returns `vec3(finalMirroredUV.xy, shouldMirror)`. `shouldMirror` is * `step(0, signedDistance)`, a hard 0/1 pick used to select between the near side * (original UV) and the reflected side. */ export declare const mirrorReflect: import('typegpu').TgpuFn<(center: d.Vec2f, angle: d.F32, uv: d.Vec2f, aspect: d.F32) => d.Vec3f>; /** * Mirror the UV across the canvas axes. `flipX`/`flipY` arrive as ±1 f32 uniforms * (transformBoolean maps false → −1, NOT 0 — so they must be COMPARED, never used as a * mix factor). The flip maps [0,1] onto [0,1], so no edge handling is ever needed. */ export declare const flipUV: import('typegpu').TgpuFn<(uv: d.Vec2f, flipX: d.F32, flipY: d.F32) => d.Vec2f>; /** * Invert the bent-sheet projection for one screen UV. * * The sheet is FLAT inside |s| ≤ f (the falloff threshold) and parabolic beyond it: * z = b·u² with u = (|s| − f)/(1 − f) — falloff 0 curves the whole frame (u = |s|), higher * keeps the middle untouched and concentrates the bend at the ends. A sheet point at * (s, t, z) projects to screen (s·k, t·k) with k = D/(D − z), so we must INVERT: given the * screen coordinate find the sheet coordinate. Inside the flat region that's the identity; * beyond it a quadratic in u — b·m'·u² + D(1−f)·u + D(f − m') = 0 (m' = |s'| screen) → * u = (√(D²(1−f)² + 4·b·m'·D·(m'−f)) − D(1−f))/(2·b·m') — picked so the root collapses to * u = (m'−f)/(1−f) as b → 0 (guarded by the linear fallback there). Across the axis the * inverse is direct: t = t'·(D − z)/D, which is what makes edges swell in BOTH dimensions. * When the discriminant goes negative (bend-away, past the sheet's visible silhouette) there * is no sheet under that pixel — the coordinate is pushed far out of [0,1] so the edge mode * decides (transparent by default). All math in aspect-corrected space so the axis is a true * direction on any canvas. */ export declare const bendRemap: import('typegpu').TgpuFn<(strength: d.F32, falloff: d.F32, angle: d.F32, uv: d.Vec2f, aspect: d.F32) => d.Vec2f>; /** * The bulge/pinch UV displacement around `center`. Negative displacement (positive * `strength`, then negated) scales the delta down → magnification; positive → pinch. */ export declare const bulgeUV: import('typegpu').TgpuFn<(center: d.Vec2f, strength: d.F32, radius: d.F32, falloff: d.F32, uv: d.Vec2f, aspect: d.F32) => d.Vec2f>; /** Rotate the delta-from-center by an angle proportional to its distance — the twist map. */ export declare const twirlUV: import('typegpu').TgpuFn<(center: d.Vec2f, intensity: d.F32, uv: d.Vec2f, aspect: d.F32) => d.Vec2f>; /** * Radial mirrored-segment fold. The angle is measured with `atan2` (range [-π, π]) and the * rotation offset can push it negative, so the segment wrap MUST use FLOORED mod * (`x - m*floor(x/m)`) — `std.mod` is TRUNCATED (%), which differs from a floored `mod` * for negative operands and would tear the fold near angle 0. */ export declare const kaleidoscopeUV: import('typegpu').TgpuFn<(center: d.Vec2f, segments: d.F32, angle: d.F32, uv: d.Vec2f, aspect: d.F32) => d.Vec2f>; /** * Directional stretch: decompose the delta-from-center into a component parallel to the * stretch axis and a perpendicular one; the parallel component is compressed by a * strength-scaled factor that ramps in past the center along the axis (falloff controls * the ramp width). strength/falloff carry internal scale factors (×100, ×75). */ export declare const stretchUV: import('typegpu').TgpuFn<(center: d.Vec2f, strength: d.F32, angle: d.F32, falloff: d.F32, uv: d.Vec2f, aspect: d.F32) => d.Vec2f>; /** * Compute the wave phase for a screen UV: aspect-correct the centered UV, take the rotated-Y * projection by `angle`, scale into [0, 2π) cycles by `frequency`, and offset by the * accumulated animation time `t`. */ export declare const wavePhase: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, angle: d.F32, frequency: d.F32, t: d.F32) => d.F32>; /** * Displace the base UV along the rotated axis by the wave value (×strength×0.5, X * aspect-divided back to UV space). */ export declare const waveApply: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, angle: d.F32, strength: d.F32, wave: d.F32) => d.Vec2f>; export declare const waveformSine: import('typegpu').TgpuFn<(phase: d.F32) => d.F32>; export declare const waveformTriangle: import('typegpu').TgpuFn<(phase: d.F32) => d.F32>; export declare const waveformSquare: import('typegpu').TgpuFn<(phase: d.F32) => d.F32>; export declare const waveformSawtooth: import('typegpu').TgpuFn<(phase: d.F32) => d.F32>; export declare const waveformBounce: import('typegpu').TgpuFn<(phase: d.F32) => d.F32>; export declare const waveDistortSine: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, angle: d.F32, frequency: d.F32, strength: d.F32, t: d.F32) => d.Vec2f>; export declare const waveDistortTriangle: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, angle: d.F32, frequency: d.F32, strength: d.F32, t: d.F32) => d.Vec2f>; export declare const waveDistortSquare: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, angle: d.F32, frequency: d.F32, strength: d.F32, t: d.F32) => d.Vec2f>; export declare const waveDistortSawtooth: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, angle: d.F32, frequency: d.F32, strength: d.F32, t: d.F32) => d.Vec2f>; export declare const waveDistortBounce: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, angle: d.F32, frequency: d.F32, strength: d.F32, t: d.F32) => d.Vec2f>; /** * Rectangular → polar mapping (pre-blend). The angle (`atan2`, [-π, π]) is normalised to * [0, 1] and scaled by `wrap`; the radius is scaled by `radius`. */ export declare const polarCoordsUV: import('typegpu').TgpuFn<(center: d.Vec2f, wrap: d.F32, radius: d.F32, uv: d.Vec2f, aspect: d.F32) => d.Vec2f>; /** * Polar → rectangular mapping (pre-blend): treats the base UV as polar (`u`=angle, * `v`=radius) and converts to rectangular space. NOTE: unlike the other distortions, * `center.x` is NOT aspect-corrected here (the rectangular X is aspect-divided and added * to the raw center.x). */ export declare const rectCoordsUV: import('typegpu').TgpuFn<(center: d.Vec2f, scale: d.F32, uv: d.Vec2f, aspect: d.F32) => d.Vec2f>; export declare const cornerPinSafeDiv: import('typegpu').TgpuFn<(n: d.F32, dv: d.F32) => d.F32>; export declare const cornerSideOf: import('typegpu').TgpuFn<(p: d.Vec2f, a: d.Vec2f, b: d.Vec2f) => d.F32>; export declare const cornerInsideTri: import('typegpu').TgpuFn<(p: d.Vec2f, a: d.Vec2f, b: d.Vec2f, c: d.Vec2f) => d.F32>; export declare const cornerProjectToDiagonal: import('typegpu').TgpuFn<(p: d.Vec2f, a: d.Vec2f, b: d.Vec2f, refSide: d.F32) => d.Vec2f>; export declare const cornerConvexify: import('typegpu').TgpuFn<(p: d.Vec2f, a: d.Vec2f, b: d.Vec2f, o: d.Vec2f) => d.Vec2f>; /** * Square→quad homography (Heckbert), inverted analytically. * * Maps `coord` to the source coordinate to sample, treating the four pinned corners as a * projective quad (a true corner-pin homography). Returns vec3(su, sv, front) — front (0/1) * gates coverage on the visible side of the quad (den·det ≥ 0). `amount` blends each corner * toward its neutral rectangle position. Corners arrive as the transformed props * (transformPosition stores `(x, 1-y)`), so `1 - c.y` recovers the authored y. Corner order * = [topLeft, topRight, bottomRight, bottomLeft]. */ export declare const cornerPinSample: import('typegpu').TgpuFn<(coord: d.Vec2f, amount: d.F32, c0: d.Vec2f, c1: d.Vec2f, c2: d.Vec2f, c3: d.Vec2f) => d.Vec3f>; /** * Inverse perspective projection (ray–plane intersection): rotate the plane in 3D * (pan/tilt), with `fov` controlling perspective intensity and `zoom` scaling the sampled * area. No aspect correction (samples in raw UV space). `max(divisor, 0.001)` guards the * projective divides. */ export declare const perspectiveUV: import('typegpu').TgpuFn<(center: d.Vec2f, pan: d.F32, tilt: d.F32, fov: d.F32, zoom: d.F32, offset: d.Vec2f, uv: d.Vec2f) => d.Vec2f>; /** Rotate a UV around the (transformed) center by `angle`, aspect-corrected. */ export declare const csRotateUV: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, center: d.Vec2f, angle: d.F32) => d.Vec2f>; /** * Per-ring blended rotation: hash each ring's static + animated rotation (`legacySinHash11`, * the shared sin-fract hash), blend adjacent rings along the SHORTEST angular path (wrap the * difference to [-π, π] with a FLOORED mod so the blend never spirals through extra * rotations), smoothstep across the ring boundary, then apply {@link csRotateUV}. */ export declare const concentricSpinUV: import('typegpu').TgpuFn<(center: d.Vec2f, intensity: d.F32, rings: d.F32, smoothness: d.F32, seed: d.F32, speedRandomness: d.F32, animTime: d.F32, uv: d.Vec2f, aspect: d.F32) => d.Vec2f>; /** * Constant-speed flow through drifting 3D noise: three noise layers each drift through a 3D * `mxNoiseFloat3` field at different rates; the noise value is used as a flow ANGLE (not a * magnitude), so the combined + normalised flow has constant speed and displaces the base * UV by `strength` (X aspect-divided back to UV space). `time` (flow drift) and * `evolutionTime` (z-axis pattern reshape) are two independent animated clocks. */ export declare const flowFieldUV: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, scale: d.F32, strength: d.F32, time: d.F32, evolutionTime: d.F32) => d.Vec2f>; /** * Slide alternating strips out of the frame — the "shredder" transition. A directional * coordinate dices the frame into `sliceCount` strips; each strip's lookup slides ALONG * the strip (perpendicular to the dicing direction), alternating ±, by up to just over the * frame's full extent — at progress 1 every lookup is out of bounds, and transparent edge * handling clips the vacated space. */ export declare const sliceWipeUV: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, angleDeg: d.F32, sliceCount: d.F32, progress: d.F32) => d.Vec2f>; /** * Deterministic bar geometry: rotate the UV into bar-space, shift the perpendicular axis by * `offset`, un-rotate, un-center back to UV space. */ export declare const barSampleUV: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, angle: d.F32, offset: d.F32) => d.Vec2f>; /** * Full per-bar displacement: which bar this pixel belongs to (hard-edged), its static + * animated hash offset (`legacySinHash11`, the shared sin-fract hash), then the * deterministic {@link barSampleUV}. */ export declare const barShiftUV: import('typegpu').TgpuFn<(count: d.F32, angle: d.F32, intensity: d.F32, seed: d.F32, animTime: d.F32, uv: d.Vec2f, aspect: d.F32) => d.Vec2f>; /** Snap a UV to the centre of its distortion-grid cell (aspect-corrected cell counts). */ export declare const gridCellSnap: import('typegpu').TgpuFn<(uv: d.Vec2f, gridSize: d.F32, aspect: d.F32) => d.Vec2f>; /** Offset a UV by the clamped displacement (±0.1 clamp). */ export declare const gridDistortOffsetUV: import('typegpu').TgpuFn<(uv: d.Vec2f, disp: d.Vec2f) => d.Vec2f>; /** The intensity-scaled, clamped displaced UV (±0.15 clamp) for a liquid displacement field. */ export declare const liquifyOffsetUV: import('typegpu').TgpuFn<(uv: d.Vec2f, disp: d.Vec2f, intensity: d.F32) => d.Vec2f>; /** twoAxis — source RED drives horizontal, GREEN drives vertical (0.5 = neutral). */ export declare const dmDisplaceRG: import('typegpu').TgpuFn<(uv: d.Vec2f, src: d.Vec4f, aspect: d.F32, amount: d.F32) => d.Vec2f>; /** directional — source LUMINANCE pushes along a fixed angle (0.5 = neutral). */ export declare const dmDisplaceLuminance: import('typegpu').TgpuFn<(uv: d.Vec2f, src: d.Vec4f, aspect: d.F32, amount: d.F32, angleDeg: d.F32) => d.Vec2f>; export declare const FlutedGeom: d.WgslStruct<{ refractedUV: d.Vec2f; chrOff: d.Vec2f; slope: d.F32; }>; export declare const flutedGlassGeom: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, t: d.F32, angleDeg: d.F32, frequency: d.F32, softness: d.F32, waveAmp: d.F32, waveFreq: d.F32, refraction: d.F32, aberration: d.F32, shapeParams: d.Vec3f) => d.WgslStruct<{ refractedUV: d.Vec2f; chrOff: d.Vec2f; slope: d.F32; }>>; /** * Blinn-Phong specular with Schlick-Fresnel weighting over a 1D surface slope — * N = (slope, sqrt(1-slope²)), light half-vector from `lightAngleDeg` (0 = head-on, * 90 = grazing). `softness` spreads the peak (shininess = exp2(8 − softness·7)). */ export declare const blinnHighlight: import('typegpu').TgpuFn<(slope: d.F32, lightAngleDeg: d.F32, intensity: d.F32, softness: d.F32) => d.F32>; export declare const PagePeelGeom: d.WgslStruct<{ curlUV: d.Vec2f; theta: d.F32; distPastCrease: d.F32; distIntoPeel: d.F32; flatReach: d.F32; peelReach: d.F32; foldBlend: d.F32; showCurl: d.F32; }>; export declare const pagePeelGeom: import('typegpu').TgpuFn<(uv: d.Vec2f, aspect: d.F32, cornerX: d.F32, cornerY: d.F32, oppX: d.F32, oppY: d.F32, amount: d.F32, radius: d.F32) => d.WgslStruct<{ curlUV: d.Vec2f; theta: d.F32; distPastCrease: d.F32; distIntoPeel: d.F32; flatReach: d.F32; peelReach: d.F32; foldBlend: d.F32; showCurl: d.F32; }>>; /** Shade the crook of a curl near its crease, easing to full brightness at the lip. */ export declare const curlShade: import('typegpu').TgpuFn<(theta: d.F32, shading: d.F32) => d.F32>; /** * Soft specular sheen band up the curl: a Gaussian in normalized fold angle, centred toward * the lip (0.65 of the quarter turn), with `softness` widening the band. */ export declare const curlSheen: import('typegpu').TgpuFn<(theta: d.F32, intensity: d.F32, softness: d.F32) => d.F32>; /** * Contact-shadow strength over a lift `amount`: sharp+dark when the lip first lifts * (smoothstep in over the first 4%), softening + fading to 0 by amount 1. */ export declare const liftShadowStrength: import('typegpu').TgpuFn<(amount: d.F32) => d.F32>; /** * One-sided contact-shadow falloff: full at `dist` 0, easing to nothing by `reach` * (`exponent` shapes the ease), zero on the negative side. */ export declare const shadowFalloff: import('typegpu').TgpuFn<(dist: d.F32, reach: d.F32, exponent: d.F32) => d.F32>; /** Shade multiplier on the flat page a lifted lip overhangs (1 = unshadowed). */ export declare const overhangShade: import('typegpu').TgpuFn<(dist: d.F32, reach: d.F32, amount: d.F32, shadow: d.F32) => d.F32>; /** Shadow alpha cast onto the surface a peel reveals. */ export declare const revealShadow: import('typegpu').TgpuFn<(dist: d.F32, reach: d.F32, amount: d.F32, shadow: d.F32) => d.F32>; /** * Composite (back to front): revealed-surface cast shadow, flat page (shaded under the * overhang), then the peeling lip (crook-shaded + sheened) on top. Result is premultiplied * — the caller unpremultiplies. */ export declare const pagePeelCompose: import('typegpu').TgpuFn<(curlSample: d.Vec4f, flatSample: d.Vec4f, curlBright: d.F32, spec: d.F32, flatShade: d.F32, peelAlpha: d.F32, foldBlend: d.F32, showCurl: d.F32) => d.Vec4f>; /** * Sphere-surface geometry: the bulged sample UV, the sphere boundary coverage, and the * surface normal — the inputs the shading parts work from. The center double-flip recovers * the authored y; z = sqrt(1 − r²) sphere surface; `depth` scales the bulge. Pure — no * texture. `center` is the transformed (x, 1−y) prop value. */ export declare const SphereBulge: d.WgslStruct<{ uv: d.Vec2f; coverage: d.F32; normal: d.Vec3f; }>; export declare const sphereBulge: import('typegpu').TgpuFn<(uv: d.Vec2f, viewport: d.Vec2f, center: d.Vec2f, radius: d.F32, depth: d.F32) => d.WgslStruct<{ uv: d.Vec2f; coverage: d.F32; normal: d.Vec3f; }>>; /** * Directional fresnel rim light over a surface normal: strongest at grazing edges * (fresnel power hardening as `softness` drops), biased toward the light direction. * `lightPos` is the transformed (x, 1−y) position prop. */ export declare const rimLight: import('typegpu').TgpuFn<(normal: d.Vec3f, lightPos: d.Vec2f, intensity: d.F32, softness: d.F32) => d.F32>; /** Add a tinted rim to a straight-alpha sample and gate its alpha by a coverage mask. Pure. */ export declare const rimComposite: import('typegpu').TgpuFn<(straight: d.Vec4f, lightColor: d.Vec3f, rim: d.F32, coverage: d.F32) => d.Vec4f>; /** * Chromatic three-tap split: sample at `uv ± offset` for red/blue and at `uv` for green, * recombining per channel (alpha from the centre tap). */ export declare function rgbSplitTaps(sample: (uv: Expr) => Expr, uv: Expr, offset: Expr): Expr; /** * Compile-time edge-mode sampler that CLIPS on the transparent mode: out-of-bounds zeroes * the WHOLE premultiplied vec4 (coverage), so edge-clamped RGB can't leak through a * multi-tap recombination. The other modes enforce the UV contract (stretch = clamp). */ export declare function edgeClipSample(sample: (uv: Expr) => Expr, uv: Expr, edgeMode: number): Expr; //# sourceMappingURL=warpMaps.d.ts.map