Selective volumetric blur effect: how best to create mask

Hi,

I like experimenting with shaders and VFX and would love to hear some ideas on how to approach the following effect: a “selective”, smoothly fading blur of parts of the scene - not blurring specific objects, but basically 3D volumes surrounding objects partially or completely - and modulating the strength of the blur effect so that there are no sharp edges going from fully sharp outside the volumes to fully blurred inside.
For example, imagine a bench where one end is completely crisp and clear, but the closer you look toward the other end, the blurrier it and the surrounding floor become.

My idea is to somehow render a grayscale mask texture where each pixel value acts as a multiplier for the blur strength (1 = fully blurred, 0 = no blur), and then read it in a fullscreen blur shader used in a URP Fullscreen Pass Renderer Feature. I have a proof-of-concept setup working, but I’m unsure what the best way to create the mask texture would be.

So far, I render spheres using a custom transparent shader with a Fresnel effect to fade out towards the edges and played around with alpha blending modes and blend ops to smooth out the appearance where they overlap (so I can “combine” spheres into different shapes). Smooth Additive blending (Blend OneMinusDstColor One and BlendOp Add) gives nice, smooth transitions, but having multiple spheres stacked along the view direction naturally “hardens” the edges again. Using BlendOp Max alleviates the stacking problem but with less smooth transitions.

So my question is: what is the best way to create the mask texture, is there a better way of blending or should I consider a totally different approach?
SDFs came to mind for the “mask volumes”, but I don’t have much experience with SDFs in 3D so I can’t judge how practical and performant that would be (looking at PC, not mobile hardware, but don’t want it to be too expensive nonetheless).