Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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:
    172
    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!