import type { ShaderPassPipeline } from '@luma.gl/shadertools'; type FogUniforms = { fogColor: [number, number, number, number]; density: number; heightFalloff: number; scattering: number; historyWeight: number; time: number; }; export declare const volumetricFogPass: { readonly name: "volumetricFog"; readonly source: "struct volumetricFogUniforms {\n fogColor: vec4f,\n density: f32,\n heightFalloff: f32,\n scattering: f32,\n historyWeight: f32,\n time: f32,\n};\n@group(0) @binding(auto) var volumetricFog: volumetricFogUniforms;\n@group(0) @binding(auto) var depthTexture: texture_depth_2d;\n@group(0) @binding(auto) var depthTextureSampler: sampler;\n@group(0) @binding(auto) var historyTexture: texture_2d;\n@group(0) @binding(auto) var historyTextureSampler: sampler;\nfn volumetricFog_sampleColor(\n sourceTexture: texture_2d, sourceTextureSampler: sampler, texSize: vec2f, texCoord: vec2f\n) -> vec4f {\n let sourceColor = textureSample(sourceTexture, sourceTextureSampler, texCoord);\n let depth = textureSample(depthTexture, depthTextureSampler, texCoord);\n let noise = fract(sin(dot(texCoord * vec2f(textureDimensions(depthTexture)) + volumetricFog.time, vec2f(12.9898, 78.233))) * 43758.5453);\n var opticalDepth = 0.0;\n for (var index: i32 = 0; index < 20; index++) {\n let distance = (f32(index) + noise) / 20.0 * depth;\n let heightDensity = exp(-max((texCoord.y - 0.42) + distance * 0.18, 0.0) * volumetricFog.heightFalloff);\n opticalDepth += heightDensity * volumetricFog.density * depth / 20.0;\n }\n let fogAmount = clamp(1.0 - exp(-opticalDepth * 8.0), 0.0, 0.96);\n let sun = pow(max(1.0 - distance(texCoord, vec2f(0.72, 0.24)) * 1.7, 0.0), 8.0) * volumetricFog.scattering;\n let fogged = vec4f(mix(sourceColor.rgb, volumetricFog.fogColor.rgb + sun * volumetricFog.fogColor.a, fogAmount), sourceColor.a);\n let history = textureSample(historyTexture, historyTextureSampler, texCoord);\n return mix(fogged, history, volumetricFog.historyWeight);\n}"; readonly bindingLayout: readonly [{ readonly name: "depthTexture"; readonly group: 0; }, { readonly name: "historyTexture"; readonly group: 0; }]; readonly uniforms: FogUniforms; readonly uniformTypes: { readonly fogColor: "vec4"; readonly density: "f32"; readonly heightFalloff: "f32"; readonly scattering: "f32"; readonly historyWeight: "f32"; readonly time: "f32"; }; readonly propTypes: { readonly fogColor: { readonly value: readonly [0.18, 0.34, 0.48, 0.6]; }; readonly density: { readonly value: 0.22; readonly min: 0; readonly softMax: 1; }; readonly heightFalloff: { readonly value: 3; readonly min: 0; readonly softMax: 10; }; readonly scattering: { readonly value: 0.35; readonly min: 0; readonly softMax: 2; }; readonly historyWeight: { readonly value: 0.82; readonly min: 0; readonly max: 0.98; }; readonly time: { readonly value: 0; readonly private: true; }; }; readonly passes: [{ readonly sampler: true; }]; }; export declare function createVolumetricFogShaderPassPipeline(): ShaderPassPipeline<'fogHistory'>; export {}; //# sourceMappingURL=volumetric-fog.d.ts.map