rullino
    Preparing search index...

    Variable lensBlurConst

    lensBlur: MultipassFilter<
        {
            depth: {
                default: LinearImage;
                description: "The depth map made by Estimate depth; there is nothing to set by hand.";
                label: "Depth map";
                type: "image";
            };
            focus: {
                default: 0.5;
                description: "Which depth stays sharp: 1 is the nearest part of the picture, 0 the farthest.";
                label: "Focus depth";
                max: 1;
                min: 0;
                step: 0.01;
                type: "float";
            };
            radius: {
                default: 12;
                description: "The largest blur, in pixels, for areas far from the focus.";
                label: "Blur radius (px)";
                max: 40;
                min: 0;
                step: 0.5;
                type: "float";
                unit: "px";
            };
            range: {
                default: 0.1;
                description: "How much depth around the focus also stays sharp.";
                label: "Sharp range";
                max: 0.5;
                min: 0;
                step: 0.01;
                type: "float";
            };
        },
    > = ...

    Lens blur from a depth map (depth: grey, 1 = near, 0 = far, e.g. from a depth estimator): every pixel is blurred by a disc whose radius grows with its distance from the focus depth (outside the sharp range), up to radius px. Gathering: a pixel averages 48 disc samples, each weighted by whether the sample's own blur reaches back to the pixel, so an in-focus foreground does not bleed into the blurred background. Without a depth map (the default empty image) or where it is transparent, nothing is blurred. Light is averaged premultiplied, alpha included.