Focus Stacking: how to extend depth of field when shooting close up

Step-by-step how to create a focus stacking effect: steps 11-12

11 Mask untidy areas
If the sharp parts have been accurately blended, hit Cmd/Ctrl+E to merge the top layer down. But if you find any untidy areas, click Add Layer Mask to add a mask to the top layer then grab the Brush tool and paint with black, revealing the sharper parts below.

12 Mask then merge
Continue comparing the top layer with the layers below and adding masks. Press Cmd/Ctrl+E to merge the top layer down after painting each mask until you’re left with a single, pin-sharp layer. Click the Create New Layer icon to add a new empty layer.