How can i blur everything but object using hdrp and layers?

Anyone know how to blur background and keep a prefab in focus. I am using hdrp. I looked at options in unity, and see something called volume masks. I found a solution but not sure if there is a better way to mask things not to blur.
in this example he used two cameras. I tried it but there is no clear flags, i found a another video but it was for URP, Doing some research i found graphic compositor but not sure this is best way to do it. anyone know, below is the example for non hdrp. my other idea how to do this, is somehow make custom render pass. or custom volume pass rather.

Thank goodness i found a github that solved my issue. I even wasted 5 bucks on an asset that only blurs everything. note to anyone, search your problem with ending in github it might solve it. GitHub - alelievr/HDRP-Custom-Passes: A bunch of custom passes made for HDRP

1 Like