Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug][DOF] Visible artifacts with high blur radius #117

Open
Witek902 opened this issue Dec 6, 2024 · 0 comments
Open

[Bug][DOF] Visible artifacts with high blur radius #117

Witek902 opened this issue Dec 6, 2024 · 0 comments

Comments

@Witek902
Copy link

Witek902 commented Dec 6, 2024

Problem: At high blur radii, visible artifacts appear around objects that are in focus, as shown in the image below:
image

This issue appears to be related to insufficient dilation of tiles, especially in the background areas. The problem seems to occur in the far blur pass, where the dilated tiles buffer doesn’t cover the necessary areas.
This is far blur and dilated tiles buffer for context:
image
image

It looks like the tiles are not dilated enough, causing background pixels to use the fast path (FfxDofProcessFarColorOnly) and the color from foreground objects is leaking in this areas.

When I modify this line in the FfxDofDilateStep function in ffx_dof_dilate_depth.h:

FfxUInt32x2 tileRad = FfxDofPxRadToTiles(abs(localCocRange));

by changing it to:

FfxUInt32x2 tileRad = 2 * FfxDofPxRadToTiles(abs(localCocRange));

the issue is almost entirely resolved. This suggests that the dilation radius is too small, leading to insufficient coverage of the background pixels during the blur pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant