import { d } from '../index'; import { Expr, GpuFragmentParams } from '../../contract'; /** Uniform keys the neon builder reads via `params.uniforms.`. */ export interface NeonEffectUniforms { center: unknown; scale: unknown; rotation: unknown; color: unknown; secondaryColor: unknown; secondaryBlend: unknown; glowColor: unknown; tubeThickness: unknown; intensity: unknown; hotCoreIntensity: unknown; glowIntensity: unknown; glowRadius: unknown; lightAngle: unknown; specularIntensity: unknown; specularSize: unknown; cornerSmoothing: unknown; flickerSpeed: unknown; flickerAmount: unknown; flowSpeed: unknown; flowAmount: unknown; } export interface NeonEffectOptions { /** Treat the field as a 3D thickness map — trace tubes along all edges via view-depth creases. */ volumetric?: boolean; /** Cheap bilinear sampler for the neighbour taps (compute path). Falls back to sdfSampler. */ gradSampler?: (uv: Expr) => Expr; } /** Corner-smoothing / tube stencil radius. Volumetric: doubles as the tube radius. Pure. */ export declare const neonSmoothEPS: import('typegpu').TgpuFn<(tubeThickness: d.F32, cornerSmoothing: d.F32, volumetric: d.F32) => d.F32>; /** Two-layer outer glow (tight inner + wide outer bloom), masked to the exterior. Returns * `glowMasked`. `sdf` is the corner-smoothed field value. Pure — CPU-golden-testable. */ export declare const neonGlow: import('typegpu').TgpuFn<(sdf: d.F32, glowRadius: d.F32, glowIntensity: d.F32) => d.F32>; /** Sporadic on/off flicker from three irrational-ratio sines. Higher `flickerAmount` → dark more * often. Pure — CPU-golden-testable. */ export declare const neonFlicker: import('typegpu').TgpuFn<(time: d.F32, flickerSpeed: d.F32, flickerAmount: d.F32) => d.F32>; /** Rotating brightness band (`flowMod`): angular position drives a sweeping sine. Pure. */ export declare const neonFlow: import('typegpu').TgpuFn<(sdfUV: d.Vec2f, time: d.F32, flowSpeed: d.F32, flowAmount: d.F32) => d.F32>; /** * The full neon tube + glow composite. Takes the 5 SDF taps (centre + R/L/U/D), the stencil * radius, the field-space `sdfUV` (for the flow angle), `scale`/`viewportSize` (softPx), `time`, * and the uniforms. Models the interior depth as a semicircular tube cross-section, shades it with * Blinn-Phong + self-emission + hot core, adds the multi-layer glow, and merges tube over glow. * Returns STRAIGHT rgba (always cutout). Resolve-goldenable. */ export declare const neonComposite: import('typegpu').TgpuFn<(sC: d.Vec4f, sR: d.Vec4f, sL: d.Vec4f, sU: d.Vec4f, sD: d.Vec4f, smoothEPS: d.F32, sdfUV: d.Vec2f, scale: d.F32, viewportSize: d.Vec2f, time: d.F32, cornerSmoothing: d.F32, tubeThickness: d.F32, color: d.Vec3f, secondaryColor: d.Vec3f, secondaryBlend: d.F32, glowColor: d.Vec3f, intensity: d.F32, hotCoreIntensity: d.F32, glowIntensity: d.F32, glowRadius: d.F32, lightAngle: d.F32, specularIntensity: d.F32, specularSize: d.F32, flickerSpeed: d.F32, flickerAmount: d.F32, flowSpeed: d.F32, flowAmount: d.F32, volumetric: d.F32) => d.Vec4f>; /** * Apply the neon tube effect. Composition-time Expr builder — see the file header for the notes. * * @param params the fragment builder params (reads `uniforms`/`ctx`) * @param sdfSampler `(uvExpr) → vec4 Expr`: `.r` = signed distance/−chord, `.a` = view depth * @param time accumulated animated-time Expr * @param options `volumetric` + an optional cheap `gradSampler` for the neighbour taps */ export declare function applyNeonEffect(params: GpuFragmentParams, sdfSampler: (uv: Expr) => Expr, time: Expr, options?: NeonEffectOptions): Expr; //# sourceMappingURL=neon.d.ts.map