At high magnifications, focus stacking has to deal with a persistent and misunderstood optical artifact often referred to as ‘haze’ or ‘halo’. This usually manifests as a soft milky or hazy glow on areas of the image which should otherwise appear sharp and well-defined. It's critical for photographers to understand the cause of this haze to minimize its presence, this begins with understanding what the camera is actually ‘seeing’ at each step of the focus stack.
Remember, when focus stacking the camera captures a series of images across the depth of the subject, with each having only a thin band in sharp focus. Everything outside of that thin band stays out of focus and appears as a soft blur or fuzz
This isn't usually a problem when the blurred regions fall against an empty background. In such cases the stacking software just ignores the blurred areas and selects the version of each region where it appears sharpest.
The problem begins to arise when structures at different depths overlap from the camera’s point of view, or when one part of the subject sits directly in front of another, with significant distance between them.
In this case, when the camera focuses on the part of the subject behind another structure that's closer (from the point of view of the camera), the closer structure is so blurred that it is effectively transparent (or tinted) - the slight colour changes or shading is typically lost in the detail of the image, except in regions where sharp edges exist where human eyes can easily pick out the slight changes and recognize the artifact.
Consider a simple scenario: a flower with two structures, one close to the camera and one further away, and the closer one partially overlaps the one behind it from the camera’s perspective.
When the camera focuses on the structure in the back, the front structure is out of focus. But it has not disappeared — it is still physically in the light path between the camera and the background structure. The out-of-focus front structure scatters its light across a wide area of the sensor, producing a soft, bright glow that is superimposed directly on top of the focused background structure.
This is the critical point: the camera has faithfully recorded what was in front of it, but what was in front of it includes both the sharply focused background structure and the defocused light from the foreground structure simultaneously. There is no frame in the entire stack where the background structure appears both in focus and free of this contamination.
Because the stacking software can only work with what the camera has actually captured, it cannot remove light that was physically present in every relevant frame. The haze is real and it is not a software error or processing artifact. It is an accurate reproduction of the light that reached the sensor.
The severity of this haze is governed by two factors: the physical distance separating the overlapping structures, and the magnification at which they are photographed.
Greater separation between the overlapping structures means the foreground element is further out of focus when the background element is sharp. A more defocused foreground produces a larger, more diffuse blur — and consequently a more prominent haze in the final image.
Higher magnification makes this worse in two ways. First, the depth of field becomes extremely narrow, meaning the foreground structure goes out of focus much more abruptly. Second, at high magnification the cone of light admitted by the lens is relatively wide, which means that even a small foreground structure can scatter its defocused light across a large portion of the image.
This is why the haze effect is particularly pronounced in deep stacks at magnifications of 2.5× and above, where hundreds of frames may be required and the three-dimensional complexity of the subject all but guarantees overlapping structures at different depths.
In a focus stack, out-of-focus foreground structures become something like a frosted pane of glass between the camera and whatever lies behind them. The stacking software can't see through them any more than your eye could see through frosted glass, because the ‘clean’ image simply doesn't exist in any frame of the stack.