Exported assets are free to use commercially and modify.

DOFMipMapShader.js

DOFMipMapShader

Mipmap depth of field

DOFMipMapShader
Preview requires WebGL2. You can still download the demo.
Drag to orbit · Middle-drag to pan · Scroll to zoomOne finger to orbit · Two fingers to pan or zoom

Makes scenery clear or blurry based on distance, like a photo with only one area sharp.

Official source