How to handle the screen wrap repeat of FFT-based bloom effect?

306 views Asked by At

I am currently working on the FFT-based bloom effect. With the help of a paper from GPU Gems, it works fine.

But it turned out that if the sparse point is near the edge of the screen, the bloom effect would wrap on the screen like this:

wrap effect

How to handle this please?

1

There are 1 answers

0
hotpaw2 On

If you don't want circular convolution artifacts, then pad the data on the 4 edges by the width & height of the effect before applying the effect. Remove the padded areas after. Zero-pading and mirroring the image are common padding choices.