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. Dismiss Notice

Bug Renderer2D upscale filter is using Point filtering instead Bilinear when post-processing is enabled.

Discussion in 'Universal Render Pipeline' started by Erdroy, Jun 17, 2023.

  1. Erdroy

    Erdroy

    Joined:
    Jan 12, 2013
    Posts:
    19
    Hello

    We stumbled upon an issue, during transitioning from Unity 2021 to Unity 2022.3f1 LTS.
    It is related to the upscale filtering not working with post-processing enabled (I've attached image with post processing enabled and disabled).
    We use upscale filtering for better rendering visuals, as we render our game at 2x the resolution and rely on the final blit filtering. We're using Unity 2022.3f1, with urp package 14.0.8.

    I've tracked the issue down to the texture "_AfterPostProcessTexture" that has point filter mode set by-default, and the filtering mode set in renderer settings does not affect it.

    By changing Renderer2D.cs:285
    Code (CSharp):
    1. RenderingUtils.ReAllocateIfNeeded(ref m_PostProcessPasses.m_AfterPostProcessColor, desc, FilterMode.Point, TextureWrapMode.Clamp, name: "_AfterPostProcessTexture");
    to:
    Code (CSharp):
    1. RenderingUtils.ReAllocateIfNeeded(ref m_PostProcessPasses.m_AfterPostProcessColor, desc, FilterMode.Bilinear, TextureWrapMode.Clamp, name: "_AfterPostProcessTexture");
    it brings back the old behaviour.

    Could we get instructions what to do, to fix the filtering issue? It's critical at this moment, as we need to upgrade to the latest LTS and we're 2 months before release.
     

    Attached Files:

  2. Erdroy

    Erdroy

    Joined:
    Jan 12, 2013
    Posts:
    19
    Okay, temporarily I've made a local package with the lines replaced so we're not in hurry anymore.