import { Node, Texture, UniformNode, Vector2 } from 'three/webgpu'; export type BlurNodeUniforms = { /** * How far one tap steps, in UV. * * A direction and a radius in one: `(r, 0)` blurs horizontally, `(0, r)` * vertically. The widest tap sits four steps out, so the radius this * describes is four times its length. */ uDirection: UniformNode<'vec2', Vector2>; }; /** * One half of a separable Gaussian blur over a texture. * * Separable means the two dimensions are two passes: blurring horizontally and * then vertically costs nine taps twice instead of the eighty-one a single * two-dimensional kernel would need, and gives the same result. * * Meant for a full-screen pass -- a `QuadMesh` with a `NodeMaterial` whose * `fragmentNode` is one of these -- because it reads {@link uv}, which is the * quad's own coordinates rather than anything in the scene. * * The texture is a constructor argument rather than a uniform, unlike the * direction: a ping-pong between two render targets reads a different texture * in each pass, and two nodes with a texture each say that more plainly than * one node whose texture is swapped between draws. * * @module */ export declare class BlurNode extends Node { /** * How many steps out the widest tap sits. * * What turns a blur radius into a {@link BlurNodeUniforms.uDirection}: the * radius divided by this is one step. */ static readonly TAPS: number; /** * @param map - What to blur. * @param uniforms - The step between taps. */ constructor(map: Texture, uniforms: BlurNodeUniforms); }