Search Unity

More intense motion blur with Post Processing Stack v2?

Discussion in 'Image Effects' started by bboydaisuke, Jan 27, 2020.

  1. bboydaisuke

    bboydaisuke

    Joined:
    Jun 14, 2014
    Posts:
    67
    Hello,
    I'm trying use motion blur using Post Processing Stack v2. It's working like this:

    I'm sure it's working. However, it looks too subtle.

    Can I get more intense motion blur just like legacy image effects?

    Motion blur with Legacy Image Effects:
     
  2. sameng

    sameng

    Joined:
    Oct 1, 2014
    Posts:
    184
    The result will not be accurate and may have artifacts but you can increase the intensity by editing MotionBlur.cs

    Add "velocityScale *= 5" to line 106. This will increase the intensity of MotionBlur by 5.

    Code (CSharp):
    1.             // Pass 1 - Velocity/depth packing
    2.             var velocityScale = settings.shutterAngle / 360f;
    3.             velocityScale *= 5;
    4.             sheet.properties.SetFloat(ShaderIDs.VelocityScale, velocityScale);
    5.             sheet.properties.SetFloat(ShaderIDs.MaxBlurRadius, maxBlurPixels);
    6.             sheet.properties.SetFloat(ShaderIDs.RcpMaxBlurRadius, 1f / maxBlurPixels);
     
  3. bboydaisuke

    bboydaisuke

    Joined:
    Jun 14, 2014
    Posts:
    67
    Thanks! That is exactly what I expected!