Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Lens blur effect

Lens blur effect

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialgraphicsadobealgorithmsquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dusan Paulovic
    wrote on last edited by
    #1

    Hi all, I am searching the web and can not find any fast way to apply Lens Blur effect like in PhotoShop. For now, I have used convolution matrix with shape drawn to kernel, but it is very slow compared to Photoshop's one. I have read many stuff on net about speeding up 2D Convolution process, but the most interesting seems to be using of GPU, but can not find any example... Another way I can imagine is to use somehow HLSL to modify texture and then convert it back to bitmap, but still do not know how to do that... Can anybody point me into right direction? Thanks in advance...

    enhzflepE 1 Reply Last reply
    0
    • D Dusan Paulovic

      Hi all, I am searching the web and can not find any fast way to apply Lens Blur effect like in PhotoShop. For now, I have used convolution matrix with shape drawn to kernel, but it is very slow compared to Photoshop's one. I have read many stuff on net about speeding up 2D Convolution process, but the most interesting seems to be using of GPU, but can not find any example... Another way I can imagine is to use somehow HLSL to modify texture and then convert it back to bitmap, but still do not know how to do that... Can anybody point me into right direction? Thanks in advance...

      enhzflepE Offline
      enhzflepE Offline
      enhzflep
      wrote on last edited by
      #2

      I'd suggest a google search for "hlsl convolve filter." If you haven't looked at GPUgems yet, you should check out Chapter 27 of GPUgems 2. 27.1.1 has information regarding how to select the pixels that are neighbours to the pixel in question. If you download Demoniak, there's a fist-full of examples at http://www.ozone3d.net[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups