Groom Hair Depth Of Field

I set the manual focus plane of the camera behind the person, turned off the foreground depth of field, and only retained the background depth of field effect. However, the pixels that appear to be hairline gaps are considered as foreground without applying the blurring effect of depth of field. What should I do to solve this problem?

I used RenderDoc to capture frames and observed that although the highlight of the hair appears to be the color of the background, it should actually be the previous pass, which calculates the translucency of HairStrand and maps the background color to the foreground hair pixels. The highlight pixels actually belong to the foreground, so DOF pass will not process them, resulting in an incorrect depth of field effect.


In fact, the real hair gaps do belong to the background and have been blurred correctly, but the blurring effect is not good either.

Is there any feasible solution from the perspective of rendering pipeline transformation?

1 Like