Luma Blur change in sampling rules/weights?

I’m using a depth map and the LumaBlur TOP to fake DOF with a render and I’m wondering if a small change could be made to how/where the luma blur samples pixels - if it is even possible.

In the images below only the white areas (from the depth map) should be (are) blurred. I’ve posted the depthmap so the depth can be clearly seen. If you look at the edge of the blurred/non-blurred area you’ll notice that that pixels in the blurred area are sampling the non-blurred pixels creating a sort of streaking coming off the non-blurred edge. Would it be possible to somehow add some weights to how much sample (pixel) contributes to the blur based on the luma level of it’s corresponding pixel in the luma input? Then if a luma sample has a value of zero blur then it doesn’t contribute to the blur of a pixel beside or near it?

Also I’ve tried all the blur types but it still happens with all of them.

I’m thinking I could write my own luma blur shader but it would be super cool if the TOP could do it.


I’m having the same issue. Did you ever figure this out?