Search Unity

special Blur shader with sharp point on the screen

Discussion in 'Shaders' started by EternalWalker, Aug 29, 2014.

  1. EternalWalker

    EternalWalker

    Joined:
    Mar 27, 2013
    Posts:
    9
    Hello,
    Im searching for a way to implement a special Blur shader.
    I want a sharp image around a variable XY-Point on the screen and it gets unsharp when you move away from this point.
    (I dont want to implement depth of field or a radial blur shader)

    How would you do that?

    It should look like this:

     
  2. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Your best bet is probably to perform the blur, and then use a mask to blend between the blurred result and the original. You won't get the perfect transition apparent in your pictures, but that's about the best you can do without things getting really expensive or really fancy.
     
  3. Flailer

    Flailer

    Joined:
    Apr 1, 2014
    Posts:
    66
    Try looking for how to do a full screen bokeh effect, the DOF in the Unity Pro package is capable of achieving this effect so if you have access or haven't burned your trial yet, have a look , this is pretty much what you are trying to implement. God speed.