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

Question PCF size in URP?

Discussion in 'Universal Render Pipeline' started by Peter-Bailey, Jun 14, 2021.

  1. Peter-Bailey

    Peter-Bailey

    Joined:
    Oct 12, 2012
    Posts:
    35
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,001
    I don't think URP is using PCF.

    Edit: I stand corrected see replies below.
     
    Last edited: Jun 15, 2021
  3. nigeljw_unity

    nigeljw_unity

    Unity Technologies

    Joined:
    Oct 7, 2020
    Posts:
    50
    URP uses a 5x5 PCF tent, which is 9 taps, but on lower tier quality settings, it can fallback to a 4 tap linear average.
     
    Last edited: Jun 15, 2021
    Peter-Bailey likes this.
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,001
  5. nigeljw_unity

    nigeljw_unity

    Unity Technologies

    Joined:
    Oct 7, 2020
    Posts:
    50
    Peter-Bailey likes this.
  6. Peter-Bailey

    Peter-Bailey

    Joined:
    Oct 12, 2012
    Posts:
    35
    Further reading to help explain Unity's optimized PCF shadow map anti-aliasing and bilinear tent filtering using various kernel sizes:

    Unity built-in shader source from 2016:
    https://xibanya.github.io/UnityShad...tinShaders/CGIncludes/UnityShadowLibrary.html

    Two articles linked in the above source code:
    http://the-witness.net/news/2013/09/shadow-mapping-summary-part-1/
    https://mynameismjp.wordpress.com/2013/09/10/shadow-maps/

    Excellent article from a series on custom scriptable render pipelines in Unity:
    https://catlikecoding.com/unity/tutorials/custom-srp/directional-shadows/

    Article is translated from Chinese, but is a good explanation of PCF and tent filtering in Unity:
    https://zhuanlan.zhihu.com/p/369761748
     
    Last edited: Jul 14, 2022
    nigeljw_unity likes this.