import * as typegpu0 from "typegpu"; import { SampledFlag, StorageFlag, TgpuBindGroup, TgpuRoot, TgpuTexture } from "typegpu"; import * as d$1 from "typegpu/data"; //#region src/jumpFlood.d.ts declare namespace jumpFlood_d_exports { export { ColorTexture, Executor, SdfTexture, classifySlot, createJumpFlood }; } /** * Slot for the classify function that determines which pixels are "inside" for the SDF. * The function receives the pixel coordinate and texture size, and returns whether * the pixel is inside (true) or outside (false). */ declare const classifySlot: typegpu0.TgpuSlot<(coord: d$1.v2u, size: d$1.v2u) => boolean>; type SdfTexture = TgpuTexture<{ size: [number, number]; format: 'rgba16float'; }> & StorageFlag & SampledFlag; type ColorTexture = TgpuTexture<{ size: [number, number]; format: 'rgba8unorm'; }> & StorageFlag & SampledFlag; type Executor = { /** Run the jump flood algorithm. */ run(): void; /** The SDF output texture (rgba16float). */ readonly sdfOutput: SdfTexture; /** The color output texture (rgba8unorm). */ readonly colorOutput: ColorTexture; /** * Returns a new executor with the additional bind group attached. * Use this to pass resources needed by custom classify or getter functions. */ with(bindGroup: TgpuBindGroup): Executor; /** Clean up GPU resources created by this executor. */ destroy(): void; /** * Eagerly initializes every pipeline by calling `initSync` on each. * Calling this is optional. */ initSync(): void; /** * Eagerly initializes every pipeline by calling `initAsync` on each. * Calling this is optional. */ initAsync(): Promise; }; type JumpFloodOptions = { root: TgpuRoot; size: { width: number; height: number; }; /** * Classify function that determines which pixels are "inside" for the SDF. * Returns true if the pixel is inside, false if outside. */ classify: (coord: d$1.v2u, size: d$1.v2u) => boolean; /** * Get the SDF value to store. Receives signed distance in pixels. */ getSdf: (coord: d$1.v2u, size: d$1.v2u, signedDist: number, insidePx: d$1.v2u, outsidePx: d$1.v2u) => number; /** * Get the color value to store. */ getColor: (coord: d$1.v2u, size: d$1.v2u, signedDist: number, insidePx: d$1.v2u, outsidePx: d$1.v2u) => d$1.v4f; }; /** * Create a Jump Flood Algorithm executor with separate SDF and color output textures. */ declare function createJumpFlood(options: JumpFloodOptions): Executor; //#endregion export { classifySlot, createJumpFlood, jumpFlood_d_exports };