Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question msaa enable/disable for mobiles

Discussion in 'General Graphics' started by bisewski, Nov 17, 2023.

  1. bisewski

    bisewski

    Joined:
    Jan 16, 2014
    Posts:
    274
    Hi!

    I am little confused here.

    I want to disable/enable the antialising in my in runtime by a simple toggle.

    My camera is setted to FXAA. My URP asset is setted MSAA to 8x.

    How disable/enable MSAA it in urp asset?

    I try in the simple way:
    [SerializeField] private UniversalRenderPipelineAsset urpAsset;
    and urpAsset.msaaSampleCount = 1; to none or urpAsset.msaaSampleCount = 8; to enable.
    And yes, it is working, but I want to select the current urp asset without use SerializeField.

    To diable in camera I am using :
    Camera.main.GetComponent<UniversalAdditionalCameraData>().antialiasing = AntialiasingMode.None

    This is for Mobile application.

    Can you help me to apply it?

    Thank you!
     
  2. tw00275

    tw00275

    Joined:
    Oct 19, 2018
    Posts:
    65
    bisewski likes this.