I’ve met a problem working in UE5.1 with volumetric materials (but tested it on 5.5 too, problem is also present). Originally I’ve met it with volumetric clouds but it seems to be a general volumetrics problem.
See example below, camera is focused on the cube and opaque appears not in blur but translucent and volume objects are in blur anyway though camera is focused on them too.
And you can notice it’s kind of weird - it’s less blurred at the bottom and more blurred towards the top. The cause is that translucent materials do not write to SceneDepth and they just get DOF-blurred based on the SceneDepth of the next object behind them.
Looking for a workaround I’ve found an option to set “Translucency Pass” in material settings. It’s possible to set it to “After DOF”, then material will be composed to the SceneColor after DOF is applied, so it will be never be blurred.
And it does work for translucent materials, they’re completely clear. This setting is also available for volume materials but it seems it does nothing and volumes are still blurred. Could be a bug - otherwise why it would be available for volumes if it does nothing.
To confirm that it has no effect at all, I’ve even investigated gpudump
- Unreal is still writing volume to “BeforeDistortion” pass instead of “After DOF”, so this option indeed is useless for volumes.
Translucent + After DOF:
Volume + After DOF:
The question is - are any other workarounds to somehow render volumes after DOF?
I’m running out of solutions and the next stop seems to be to render volumes and scene separately and then compose them together outside of Unreal but it’s kind of disappointing as it will be harder to make changes since final result will be only visible after external composition.