Focus breathing
Why changing focus can subtly change framing — and how to reproduce that field-of-view shift without confusing it with defocus.
Visible effect
Watch the frame edge
Watch the frame edges during a focus pull.
The subject may stay sharp while the composition gently expands or contracts. That change in framing is focus breathing—not blur, and not a deliberate zoom.
Architecture, a test grid, or a face near the border makes the effect easiest to see. During a focus pull, fixed details drift toward or away from the edge as if the focal length were changing.
Physics
Focusing changes the effective optical system
Internal focusing moves one or more lens groups. That movement is meant to place the chosen object distance in focus, but it can also change the objective’s effective focal length and image magnification. The same off-axis scene point then lands at a different image height, changing the field of view.
Mathematics
An empirical magnification curve
A production lens can be calibrated from measured framing at several focus distances. The playground uses a compact normalized model:q is focus position, b is the signed breathing fraction, s is magnification, andc is the optical centre.
The smoothstep curve gives zero slope at both ends of the pull. Positive b narrows the field of view toward the second focus state; negative b widens it. The percentage is an observable framing change, not a claim about a particular lens construction.
Shader
Scale source coordinates around the optical centre
The complete function below is compiled by the playground. It maps one output coordinate to a source coordinate; it does not blur, sharpen, or accumulate history.
// WHAT: Simulate focus breathing as a change in image magnification.
// HOW: Inverse-map every destination pixel around the optical centre to the
// source coordinate that produces the requested scale.
// WHY: Inverse mapping writes every output pixel exactly once and avoids holes
// that a forward coordinate warp would leave behind.
// Coordinates use normalized [0, 1] texture space; 1.0 leaves framing unchanged.
vec2 focusBreathingSourceCoordinate(
vec2 destinationUv01,
vec2 opticalCenterUv01,
float magnification
) {
// Keep the division finite even if an external caller supplies zero.
float safeMagnification = max(magnification, 0.01);
return opticalCenterUv01
+ (destinationUv01 - opticalCenterUv01) / safeMagnification;
}- Source texture
- Coordinate remapOne texture read per pixel
- Calculate the breathing scale
- Map output coordinates to the source
- Display output
Why inverse sampling is enough
- Lines 1–3 — state the contract. Coordinates use normalized texture space and magnification
1.0means unchanged framing. - Lines 5–10 — keep the optical centre fixed. The output offset is divided by magnification before sampling. Values above one therefore sample a smaller central region and appear zoomed in.
- No blur pass is present. Defocus belongs to a later point-spread stage. Combining it here would make the causal model easier to demonstrate but physically misleading.
No convolution or history buffer is required.
Notes
- Breathing direction and magnitude depend on the lens design.
- A single percentage is an artistic approximation, not lens calibration data.
- Real focus motors may add speed changes, backlash, or stepping.
- Defocus, depth of field, distortion, and stabilization are intentionally omitted.
References
Canon — The world of cinema lenses — manufacturer explanation of focus-group motion changing magnification and field of view.
ARRI Master Prime lens brochure — manufacturer reference defining breathing as an unwanted image-size shift during focus changes.