I’m working with a couple of cinematics that involve ray traced glass and depth of field. Currently, depth of field is lost after enabling “Receive SSR Transparent”.
I would like to suggest support for depth of field through transparent ray traced reflections.
First, receive transparent SSR force a depth pre pass by default so the problem seems to be coming from that. And it seems to have nothing to do with SSR itself, nor raytracing (the same happens with classic version)
I did investigate a little bit and what’s surprising is that it seems to be working as expected when the transparent in in the near blur, but not in the far blur. The two should technically behave the same way.
I’ll poke a few people and see if there’s something to do about it.
This is kind of expected because SSR on transparent forces transparent to write their depth, so it’s related but indirectly.
In HDRP, one pixel can only have one depth, so either, so you let transparents and they inhenrit the depth from what’s behind them (cubemap or geometry), or force them to write their depth but what’s behind the transparent will also have the same depth, so there’s no perfect solution here.
The reason why “it works” it the low resolution transparent pass, is that low resolution transparent pass never write their depth and they are rendered later in the pipeline so they cannot receive SSR either.
However, there’s two hacky workaround for your cases:
Use Pathtracer with Depth Of Field with Focus Mode property in Physical Camera. That way, the Depth Of Field is also path traced (not rendered as a post process), which should gives the proper result. But that doesn’t really work for realtime situation.
Use HDRP Compositor with multiple layers. That way, you could manage your background and foreground separately. That should give you more flexibility about what to blur and what not to blur.
just a random unqualified thought
Maybe it’s possible to use traveled distance of those transparent-reflective rays as some kind of depth override for those transparent pixels?