import type { ShaderPassPipeline } from '@luma.gl/shadertools'; type TAAUniforms = { historyWeight: number; depthThreshold: number; currentJitter: [number, number]; previousJitter: [number, number]; }; export declare const taaResolve: { readonly name: "taaResolve"; readonly source: "struct taaResolveUniforms {\n historyWeight: f32,\n depthThreshold: f32,\n currentJitter: vec2f,\n previousJitter: vec2f,\n};\n@group(0) @binding(auto) var taaResolve: taaResolveUniforms;\n@group(0) @binding(auto) var historyTexture: texture_2d;\n@group(0) @binding(auto) var historyTextureSampler: sampler;\n@group(0) @binding(auto) var velocityTexture: texture_2d;\n@group(0) @binding(auto) var velocityTextureSampler: sampler;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n@group(0) @binding(auto) var previousDepthTexture: texture_2d;\n@group(0) @binding(auto) var previousDepthTextureSampler: sampler;\nfn taaResolve_sampleColor(\n sourceTexture: texture_2d, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f\n) -> vec4f {\n let dimensions = vec2f(textureDimensions(sourceTexture));\n let texel = 1.0 / dimensions;\n let sceneCoord = texCoord;\n let velocity = textureSample(velocityTexture, velocityTextureSampler, sceneCoord).xy;\n let previousUv = texCoord - velocity + taaResolve.previousJitter - taaResolve.currentJitter;\n let currentDepth = textureSample(depthTexture, depthTextureSampler, sceneCoord);\n let previousDepth = textureSample(previousDepthTexture, previousDepthTextureSampler, clamp(previousUv, vec2f(0.0), vec2f(1.0))).r;\n let current = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n var minimumColor = current.rgb;\n var maximumColor = current.rgb;\n for (var y: i32 = -1; y <= 1; y++) {\n for (var x: i32 = -1; x <= 1; x++) {\n let sampleColor = textureSample(sourceTexture, sourceTextureSampler, texCoord + vec2f(f32(x), f32(y)) * texel).rgb;\n minimumColor = min(minimumColor, sampleColor);\n maximumColor = max(maximumColor, sampleColor);\n }\n }\n let history = clamp(textureSample(historyTexture, historyTextureSampler, clamp(previousUv, vec2f(0.0), vec2f(1.0))).rgb, minimumColor, maximumColor);\n let validUv = all(previousUv >= vec2f(0.0)) && all(previousUv <= vec2f(1.0));\n let validDepth = abs(previousDepth - currentDepth) < taaResolve.depthThreshold;\n let weight = select(0.0, taaResolve.historyWeight, validUv && validDepth);\n return vec4f(mix(current.rgb, history, weight), current.a);\n}"; readonly bindingLayout: readonly [{ readonly name: "historyTexture"; readonly group: 0; }, { readonly name: "velocityTexture"; readonly group: 0; }, { readonly name: "depthTexture"; readonly group: 0; }, { readonly name: "previousDepthTexture"; readonly group: 0; }]; readonly uniforms: TAAUniforms; readonly uniformTypes: { readonly historyWeight: "f32"; readonly depthThreshold: "f32"; readonly currentJitter: "vec2"; readonly previousJitter: "vec2"; }; readonly propTypes: { readonly historyWeight: { readonly value: 0.9; readonly min: 0; readonly max: 0.98; }; readonly depthThreshold: { readonly value: 0.01; readonly min: 0.0001; readonly softMax: 0.1; }; readonly currentJitter: { readonly value: readonly [0, 0]; readonly private: true; }; readonly previousJitter: { readonly value: readonly [0, 0]; readonly private: true; }; }; readonly passes: [{ readonly sampler: true; }]; }; export declare const depthHistoryCopy: { readonly name: "depthHistoryCopy"; readonly source: "@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\nfn depthHistoryCopy_sampleColor(\n sourceTexture: texture_2d, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f\n) -> vec4f { let depth = textureSample(depthTexture, depthTextureSampler, texCoord); return vec4f(depth, 0.0, 0.0, 1.0); }"; readonly bindingLayout: readonly [{ readonly name: "depthTexture"; readonly group: 0; }]; readonly passes: [{ readonly sampler: true; }]; }; export declare function createTAAShaderPassPipeline(): ShaderPassPipeline<'taaHistoryColor' | 'taaHistoryDepth'>; export {}; //# sourceMappingURL=temporal-antialiasing.d.ts.map