Results 1 to 5 of 5

Thread: Blur Image

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Only blur algorithm i know that works well, reads 1+4 pixels RGB(A) values around it (up, down, left, right and self), and averages them. To get perfect result, you can't be writing to same data array that you are reading from, i mean after you have blurred top row, you would be using blurred values and nonblurred values mixed. So you need to allocate the texture memory again for writing, free the old data after blur, and then set the real texture use the newly allocated pointer.

    To get even better blur, you can read the corners aswell, and average that 9 pixel data. That's obviously slower, but possibly not as slow as doing a second pass.
    Last edited by User137; 01-03-2013 at 10:56 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •