SVGF unstable artifacts


For the past few days I’ve been implementing SVGF, but I can’t get rid of awful artifacts near shadow boundaries that I feel à trous wavelets should be able to handle.

My scene is pretty straightforward, it’s mostly a wall lit with a sphere light from a corridor on the right side - that’s how the input looks like:

… and that’s how my implementation denoises it:

I’m using 3x3 box filter (a’la A-SVGF) x 5 wavelet passes (with step sizes of 1, 2, 4, 8 and 16 px) and the main culprit seems to be the blurred variance passed to the denominator of the luminance edge stopping function, in here:


Hardcoding that factor to 1.0 gives much more stable image, but - of course - it overblurs:

Now, I think asking to analyze my code (especially since it’s a Rust shader) could be too much (although I can push it to GitHub if someone wants to take a look 😅), so my question is rather: does anyone have a low-hanging fruit-idea of what could be going on? (maybe someone’s been implementing svgf on their own and had a similar problem etc.)