Author Topic: Faster Blur  (Read 5163 times)

0 Members and 1 Guest are viewing this topic.

nikita

  • Testing Team
  • World Machine Guru
  • *****
  • Posts: 627
  • B.S. in Macro Science
    • View Profile
    • My WM Macros
Faster Blur
« on: October 08, 2008, 03:48:53 AM »
I made a macro to fill the gap between uniform and gaussian blur: Hybrid Blur
You can get it on my website: http://nkblog.nkdev.de/?page_id=446 it's at the bottom of the page.

It's supposed to be faster than gaussian blur but without the artifacts uniform blur creates. Here is a comparison of the two existing types of blur and my macro:


The results are better than I thought and it's 35% faster than gaussian blur!
That's probably not a relevant speed-up for small terrains built on fast multi-core machines, but in certain cases (large terrains, lot's of blurring, slow machine) it can save you some time.
Having used a 650MHz pc myself, I know that blurring can in fact take long enough to wish you had a faster blur device :)


edit: btw this implements filtering with the triangle function. (As opposed to gaussian and uniform blur which use the gaussian and rectangle function respectively)
« Last Edit: October 08, 2008, 03:52:30 AM by nikita »
"Every time you read or write beyond the end of an array, somewhere a fairy dies."
Richard Buckland