Downscaling and blurring

Started by
0 comments, last by Krypt0n 8 years, 10 months ago

Say I want to downscale and blur simultaneously a texture using a separable filter, like suggested here.

If the texture original size is 1280x720, should I:

1 - Do a horizontal blur to a 640x720 texture, and vertical blur to a 640x360 texture.

Or

2 - Do a horizontal blur to a 640x360 texture, and vertical blur to a 640x360 texture.

What's the difference between both approaches? Would option 1 result in higher quality?

Does this depend on the filter used? Eg: A GPU Pro 4 article about DOF uses approach 1.

Which option would you suggest for Bloom, Screen space reflections and Motion Blur?

Advertisement

downscaling is just a performance optimization, rather not scientifically covered, but by observing that if you have a blurry image, you can barely distinguish it from a half resolution image.

That's why you can half the resolution of the axis that you filter, it combines those two steps.

if you half the axis that you don't blur, it's just reducing resolution with the usual issues, you don't follow the observation from above. in that case, why would you blur horizontally first? you could half both axis and then blur, that would at least lead to consistent results.

some games do it that way for performance reasons, sometimes it may look ok, it depends on how strong you apply the blur results. if you bloom the sun, which is a big object on your screen, then it might be ok. if you apply it to thin spark particles, that might look like a noise party.

It's not that much of an implementation difference, so if you cannot decide now, I'd suggest to have both and either postpone the decision to shortly before the release, or ship with both options and either select one based on benchmarks or let the user decide.

This topic is closed to new replies.

Advertisement