How the effect is built
Two things happen at once. First the whole image is blurred with a multi-pass box filter, which is a close approximation of a Gaussian and is fast enough to run on a full-resolution photo. Then an oval mask, centred on the frame, decides how much of the blurred version each pixel receives. A smoothstep curve controls the transition so there is no visible ring where the sharp region ends.
That is exactly how a lens behaves: sharp in the focal plane, progressively softer away from it. It is not subject segmentation, which is why centring your subject gives the best result.
The three controls
| Control | What it changes | Start at |
|---|---|---|
| Blur strength | Radius of the background blur. | 26 px |
| Sharp area | How much of the centre stays in focus. | 35% |
| Edge softness | How gradual the hand-off to blur is. | 30% |
Tips for a convincing result
- Centre your subject first. Crop the photo so the subject sits in the middle of the frame — the mask is oval and centred by design.
- Do not over-blur. 20–35px reads as a real lens. Beyond that it looks like a phone filter.
- Keep the sharp region a little larger than your subject. A tight mask clips hair and shoulders.
- Fix shadows first. A blur makes uneven lighting more obvious, so correct it with remove shadows from photo before blurring.