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

Setting Antialiasing in Universal Render Pipeline

Discussion in 'Scripting' started by mtdev01, Jan 28, 2021.

  1. mtdev01

    mtdev01

    Joined:
    May 17, 2017
    Posts:
    10
    Hello

    How can I set anti alias settings in URP?

    Setting Quality Settings does not seem to have any effect and the documentation has alluded me.

    Thank you for your time!
     
  2. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,722
    In the URP render pipeline asset, there is a Quality section that has antiatliasing:

    I believe URP only supports MSAA.
     
  3. mtdev01

    mtdev01

    Joined:
    May 17, 2017
    Posts:
    10
    I think I wasn't specific, sorry. How can I change those settings in script?
     
  4. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,722
  5. mtdev01

    mtdev01

    Joined:
    May 17, 2017
    Posts:
    10
    Thank you again! I did find that and apparently I do not understand how to access the property. Tips?

    upload_2021-1-28_17-32-56.png
     
  6. MomoLikesPizzaa

    MomoLikesPizzaa

    Joined:
    May 13, 2017
    Posts:
    3
    Hey, was hoping to ask, if you figured your issue out? I am stuck at the exact same issue as you currently. Anyone know?
     
  7. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,722
    UniversalAdditionalCameraData
    is a component on your camera. Get it with GetComponent then make the changes you need.
     
  8. MomoLikesPizzaa

    MomoLikesPizzaa

    Joined:
    May 13, 2017
    Posts:
    3
    Hey thanks. That worked great. I was hoping to ask one last question.

    I am trying to change the settings within the URP asset. Settings such as Cascade Count, Shadow Resolution, and a few others. I cant seem to find any infomration regarding how to do this via script.

    I am able to manipulate settings on the Camera. Or in the Quality Tab in Project Settings.

    But I do not seem to be able to manipulate the settings in the URP asset.

    Would you by any chance, know how to do so?

    upload_2021-7-10_7-8-22.png

    Everyone I have asked so far, doesnt seem to know either what I am trying to go on about, or how to solve this issue.

    I guess to be more specific, I want to change the individual settings in this URP asset, how change the entire asset itself / URP quality level.
     
  9. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,722
    You can reference the asset directly in your script and make whatever changes you want.
    E.g.
    Code (CSharp):
    1. [SerializeField]
    2. UniversalRenderPipelineAsset pipelineAsset;
    3.  
    4. void Start() {
    5.   pipelineAsset.colorGradingMode = ColorGradingMode.HighDynamicRange;
    6. }
    https://docs.unity3d.com/Packages/c...g.Universal.UniversalRenderPipelineAsset.html
     
    kfireven likes this.