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

high vs low quality SMAA

Discussion in 'High Definition Render Pipeline' started by raghadalghonaim, Aug 24, 2020.

  1. raghadalghonaim

    raghadalghonaim

    Joined:
    Apr 22, 2020
    Posts:
    54
    I'm using SMAA as the main anti-aliasing technique for my scenes, I understand that using the highest quality is better in term of graphics but worse in terms of performance.

    However, I really want to understand what does "high" quality mean in this case? what does it change in the SMAA algorithm to make it produce high-quality anti-aliasing?

    sorry if this sounds a dumb question
     
  2. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    from: https://github.com/Unity-Technologi...haders/SubpixelMorphologicalAntialiasing.hlsl:

    * SMAA_PRESET_LOW (%60 of the quality)
    * SMAA_PRESET_MEDIUM (%80 of the quality)
    * SMAA_PRESET_HIGH (%95 of the quality)
    * SMAA_PRESET_ULTRA (%99 of the quality)

    and

    #if defined(SMAA_PRESET_LOW)
    #define SMAA_THRESHOLD 0.15
    #define SMAA_MAX_SEARCH_STEPS 4
    #define SMAA_DISABLE_DIAG_DETECTION
    #define SMAA_DISABLE_CORNER_DETECTION
    #elif defined(SMAA_PRESET_MEDIUM)
    #define SMAA_THRESHOLD 0.1
    #define SMAA_MAX_SEARCH_STEPS 8
    #define SMAA_DISABLE_DIAG_DETECTION
    #define SMAA_DISABLE_CORNER_DETECTION
    #elif defined(SMAA_PRESET_HIGH)
    #define SMAA_THRESHOLD 0.1
    #define SMAA_MAX_SEARCH_STEPS 16
    #define SMAA_MAX_SEARCH_STEPS_DIAG 8
    #define SMAA_CORNER_ROUNDING 25
    #elif defined(SMAA_PRESET_ULTRA)
    #define SMAA_THRESHOLD 0.05
    #define SMAA_MAX_SEARCH_STEPS 32
    #define SMAA_MAX_SEARCH_STEPS_DIAG 16
    #define SMAA_CORNER_ROUNDING 25
    #endif

    So basically the higher the preset, more search steps and smaller threshold. High and Ultra additionally do corner rounding.

    I don't think HDRP exposes ultra out of the box but you could easily expose it with small modification if needed.
     
    raghadalghonaim likes this.
  3. raghadalghonaim

    raghadalghonaim

    Joined:
    Apr 22, 2020
    Posts:
    54
    Thanks!!!!!