"Dynamic" Depth of Field (Defocus) script in Unity (URP)

Опубликовано: 01 Май 2026
на канале: Francesco Milanese | CG Tutorials
1,865
28

Text version with screenshots and additional resources here:
https://www.francescomilanese.com/tut...

You can find many 3D models, which can be used in Blender or other softwares, on the Adobe Stock 3D website at the following link:
https://stock.adobe.com/search/3d-assets

Hello everyone!
In this short video, I will show you how I created a dynamic Defocus effect in Unity, focusing only on the objects in the center of the camera's view while blurring the others.

Right now, I’m showcasing the final effect by exaggerating the blur, but this effect is customizable, and soon I will show you how to do it.

The video and the script were created using Unity 2022 and the Universal Rendering Pipeline.

----------

🇫🇷 Version textuelle avec captures d’écran et autres ressources ici :
https://www.francescomilanese.com/fr/...

🇩🇪 Textversion mit Screenshots und weiteren Ressourcen hier:
https://www.francescomilanese.com/de/...

🇷🇺 Текстовая версия со скриншотами и дополнительными materialami qui:
https://www.francescomilanese.com/ru/...

🇨🇳 包含截图和其他资源的文本版本在此:
https://www.francescomilanese.com/zh/...