Sign in to follow this  

Multi-pass blur settings

This topic is 4258 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Has anyone got a good implementation of Kawase's multi-pass blur algorithm, as described in http://www.daionet.gr.jp/~masa/archives/GDC2004/GDC2004_PIoHDRR_SHORT_EN.ppt pages 34-37? With the filter kernel and the blend factors I use for each pass, the filter is too "spiky". How should these be set in order to approximate a Gaussian distribution? For an arbitrary blur size? I've experimented a bit and improved the results, but I'd like a mathematically derived solution instead of one based on guesswork...

Share this post


Link to post
Share on other sites
Unfortunately, no; that article describes a standard 1-pass blur. Kawase's blur uses N passes:
(pseudo)
for (i=0;i<N;i++)
surface = originalTexture.mipmap(i)
blur(surface, kernel)
resize(surface, pow(2,i))
blend(surface, finalSurface, blendFactor)

The idea is to simulate blurs with very large kernels.

I'm hoping someone has a way to calculate kernels and blendFactors to achieve better filter shapes than the one I've currently got.

Share this post


Link to post
Share on other sites

This topic is 4258 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this