Search Unity

Remove the tangential distortion in chromatic aberration effect

Discussion in 'Image Effects' started by mrBeam, Oct 18, 2017.

  1. mrBeam

    mrBeam

    Joined:
    Mar 17, 2014
    Posts:
    11
    Hi! Is there a way for me to remove the tangential effect of the Chromatic Aberration effect in the Post Processing Stack? I want i to affect the entire screen uniformly.

    Thank you.
     
  2. mrBeam

    mrBeam

    Joined:
    Mar 17, 2014
    Posts:
    11
    Nevermind, I managed to find the code so I could edit it =)
     
    Martin_H likes this.
  3. cmann

    cmann

    Joined:
    Aug 1, 2015
    Posts:
    31
    I know this is a little old, but care to share the details?
    Or if anyone else (I'm not sure if this user is still active) knows how that would be appreciated.
     
  4. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    @cmann I know this is a bit late, but you can find the chromatic aberration code in uber.shader file, just check folder "Library\PackageCache\com.unity.postprocessing@2.1.7\PostProcessing\Shaders\Builtins\" (path might vary depending on your version).

    Inside that uber.shader file, search for "CHROMATIC_ABERRATION" and you find the location where that specific part of the code is. Distort is included from Distortion.hlsl file. You might want to extract the code and create your own custom effect.
     
  5. cmann

    cmann

    Joined:
    Aug 1, 2015
    Posts:
    31
    Thanks! That's exactly what I was looking for.
    I couldn't figure out Distort , but ended up slightly tweaking the uv/delta calculation in Uber.shader to get the results I wanted.