tunabrain / tungsten

High performance physically based renderer in C++11

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

boxFilter boundary conditions bug?

ivalylo opened this issue · comments

Hello, you said there is a bug in this nfor denoiser implementation. Could it be the boundary conditions in boxFilter()? The filtering happens only in the tile itself, which causes discontinues in the smoothing at the tile boundaries.

The boxFilter only applies to the NL-Means weights (part of computing the patch-wise distances can be reduced to a box-filter), and the corresponding data window contains enough padding so that it filters across tile boundaries. When I implemented it, I verified the tiled version against the un-tiled ground truth and the results are identical.

The bug applies to the regression and depth feature. The regression in this code sometimes overfits and carries over some residual noise, which the original EGSR version did not. Additionally, the depth feature causes odd banding artifacts (they look like concentric circles). I'm actually at a loss why that happens - they shouldn't behave like that, but somewhere my regression/weight code is doing something very odd.