Close blurred object has sharp edge on focused second object

how to fix sharp edges? used DOF. path tracing is a solution but too expensive fun. i’ve already tweaked all properties i could but no luck.

as playground i used

I think it needs more AA in a render target but @Evgeni_Popov will help more than I can here :slight_smile:

1 Like

AA used maximum i could. also thought about scaling vertices and scaling down UV depending on depth but it’s too not out of the box solution. anyway thank you for reply and tagging Evgeni :slight_smile:

1 Like

also found that Sketchfab sneakers sample has blurred edge but i don’t know what engine they’re using

+ blender sample

The lens rendering pipeline is deprecated, you should use the default rendering pipeline instead, which calculates another depth of field effect, with different parameters:

Perhaps you will be able to better achieve what you want.


for answer your thankful i am :slight_smile: i played around with you sample. and received the same artifact

maybe you can suggest some workaround. i thought maybe i could create another render with depth map which will fade out from camera to fStop and then blur it and overlay to main render with blend mode

Could you provide a PG that matches your screenshot above?

The fact that the blur is not all the way around the edge is a little strange, I’d like to dig a little deeper.

Thank you very much.

1 Like

omg thanks! - find shall you solution hope i :green_heart:

Sorry, I have some bad news: we can’t do anything about it, it’s the algorithm we use that behaves like this.

When we go from a focused pixel to an unfocused one, we have a blur only on the unfocused pixel and not on the other one, which makes a visible difference when on the line just before (or just after) these two pixels with the same X coordinates are both unfocused (or both focused).

Either the current algorithm should be improved or another one should be used to get rid of these artifacts.

1 Like

yup DOF bleeding/unbleeding is one of the main artifacts unfortunately and it would require to implement a different DOF technique which might be a good rendering improvement candidate @Evgeni_Popov ?


i got you. thanks for investigation. hope this will be improved in a future :wink:

it would be great if there will be some other implementation even with higher resource demands. like many shadowing approach cases. cause with this artifact i can’t get photorealistic scene in some scenarios. thank you guys for involvement :smile_cat:

Yup I wonder if we could add the filament technique in the framework :slight_smile:

1 Like