# How to combine bilateral blur passes?

I'm changing to bilateral blur for my SSAO implementation, just wondering how people usually combine the two passes - do you just add them together, or average, or something else?

I happen to be using Vulkan but don't think that should affect the answer too much.

• You apply one pass with your source image as input to get an intermediate image, then you apply the second pass using the intermediate image as input to get your output, no? Or am I misunderstanding the sense of "combining" that you mean? – DMGregory Dec 10 '20 at 12:26
• hmm I thought you blurred your source twice, once in each direction and then combined. I'll try what you're suggesting! – mike Dec 10 '20 at 13:28
• Ah, then I'll convert that comment to an answer. – DMGregory Dec 10 '20 at 13:31

You apply one pass with your source image as input to get an intermediate image.

Then you apply the second pass using the intermediate image as input to get your output.

   Input Image
↓
1st Pass
↓
Intermediate Image
↓
2nd Pass
↓
Output Image

• Works great as well, thanks! – mike Dec 11 '20 at 9:38