/** * Vignette - Adds a simulated lens edge darkening effect. */ export type VignetteProps = { /** 0 to 1 (0 for center of frame, 1 for edge of frame) */ radius?: number; /** 0 to 1 (0 for no effect, 1 for maximum lens darkening) */ amount?: number; }; export type VignetteUniforms = VignetteProps; /** * Vignette - * Adds a simulated lens edge darkening effect. */ export declare const vignette: { readonly props: VignetteProps; readonly uniforms: VignetteUniforms; readonly name: "vignette"; readonly source: "struct vignetteUniforms {\n radius: f32,\n amount: f32,\n};\n\n@group(0) @binding(auto) var vignette: vignetteUniforms;\n\nfn vignette_filterColor_ext(color: vec4f, texSize: vec2f, texCoord: vec2f) -> vec4f {\n let dist = distance(texCoord, vec2f(0.5, 0.5));\n let ratio = smoothstep(\n 0.8,\n vignette.radius * 0.799,\n dist * (vignette.amount + vignette.radius)\n );\n return color * ratio + vec4f(0.0, 0.0, 0.0, 1.0) * (1.0 - ratio);\n}\n"; readonly fs: "layout(std140) uniform vignetteUniforms {\n float radius;\n float amount;\n} vignette;\n\nvec4 vignette_filterColor_ext(vec4 color, vec2 texSize, vec2 texCoord) {\n float dist = distance(texCoord, vec2(0.5, 0.5));\n float ratio = smoothstep(0.8, vignette.radius * 0.799, dist * (vignette.amount + vignette.radius));\n return color.rgba * ratio + (1.0 - ratio)*vec4(0.0, 0.0, 0.0, 1.0);\n}\n"; readonly uniformTypes: { readonly radius: "f32"; readonly amount: "f32"; }; readonly defaultUniforms: { readonly radius: 0.5; readonly amount: 0.5; }; readonly propTypes: { readonly radius: { readonly value: 0.5; readonly min: 0; readonly max: 1; }; readonly amount: { readonly value: 0.5; readonly min: 0; readonly max: 1; }; }; readonly passes: [{ readonly filter: true; }]; }; //# sourceMappingURL=vignette.d.ts.map