import type { Texture } from '@luma.gl/core'; import type { ShaderPassPipeline } from '@luma.gl/shadertools'; type MotionBlurUniforms = { strength: number; sampleCount: number; }; type MotionBlurBindings = { depthTexture?: Texture; velocityTexture?: Texture; }; export declare const motionBlurPass: { readonly name: "motionBlur"; readonly source: "struct motionBlurUniforms {\n strength: f32,\n sampleCount: f32,\n};\n@group(0) @binding(auto) var motionBlur: motionBlurUniforms;\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;\nfn motionBlur_sampleColor(\n sourceTexture: texture_2d, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f\n) -> vec4f {\n let sceneCoord = texCoord;\n let velocity = textureSample(velocityTexture, velocityTextureSampler, sceneCoord).xy * motionBlur.strength;\n let centerDepth = textureSample(depthTexture, depthTextureSampler, sceneCoord);\n var color = vec4f(0.0);\n var totalWeight = 0.0;\n for (var index: i32 = 0; index < 16; index++) {\n if (f32(index) >= motionBlur.sampleCount) { break; }\n let amount = (f32(index) / max(motionBlur.sampleCount - 1.0, 1.0)) - 0.5;\n let sampleUv = clamp(texCoord - velocity * amount, vec2f(0.0), vec2f(1.0));\n let sampleDepth = textureSample(depthTexture, depthTextureSampler, sampleUv);\n let weight = exp(-abs(sampleDepth - centerDepth) * 240.0);\n color += textureSample(sourceTexture, sourceTextureSampler, sampleUv) * weight;\n totalWeight += weight;\n }\n return color / max(totalWeight, 0.0001);\n}"; readonly bindingLayout: readonly [{ readonly name: "velocityTexture"; readonly group: 0; }, { readonly name: "depthTexture"; readonly group: 0; }]; readonly props: Partial & MotionBlurBindings; readonly uniforms: MotionBlurUniforms; readonly uniformTypes: { readonly strength: "f32"; readonly sampleCount: "f32"; }; readonly propTypes: { readonly strength: { readonly value: 1; readonly min: 0; readonly softMax: 4; }; readonly sampleCount: { readonly value: 10; readonly min: 2; readonly max: 16; }; }; readonly passes: [{ readonly sampler: true; }]; }; export declare function createMotionBlurShaderPassPipeline(): ShaderPassPipeline; export {}; //# sourceMappingURL=motion-blur.d.ts.map