Search Unity

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

Question Is it possible to enable DLSS in HDRP in quality settings without it always turning on DLSS?

Discussion in 'High Definition Render Pipeline' started by colinleet, Dec 7, 2023.

  1. colinleet


    Nov 20, 2019
    I was wondering if it was possible to make it so DLSS can be enabled in the HDRP settings, without having it also always also apply the DLSS preset selected in the Quality Level as pictured here after switching to a different quality level?

    After upgrading to 2023.2 my VR game has started to always applies DLSS mode set in the "mode" drop down (pictured below) whenever the HDRP quality level is switched at runtime. For the past couple years I've had a separate user setting for changing the DLSS mode... as I've found DLSS to be nearly unplayable at "ultra performance" level in VR, and still a notable downgrade even when on max quality compared to when it's off.

    HDRP DLSS Auto On Or Always Off.png

    It's important for me that it stays off by default so only player who need DLSS have to suffer from it.

    If I felt like if it was really my choice I would just disable DLSS entirely; however as it really can be a turnkey solution to making lower end video cards (e.g. Nvidia 2060/3060) to be able to play some gamed in higher quality levels than they could otherwise... it felts a bit capricious of me to fully remove the option by disabling it in the quality setting listed above.

    Quality Levels.png

    I would really like for my players to be able to quickly switch between Potato (970+) / Low (1070+) / Medium (2070+) / and Ultra (3070+) -- without then also having to manually unselect a non-intuitive secondary feature which makes the medium and high quality modes more blurry than my "Potato" quality presets. (I am keeping DLSS disabled for the Potato/Low quality levels as they pre-date DLSS.)
  2. Qleenie


    Jan 27, 2019
    yes, you can switch the camera between using DLSS and not using DLSS. I have some open bug report which leads sometimes to reduced performance while doing so in a build using VR, but in general it works:

    Code (CSharp):
    2. HDAdditionalCameraData HDCam = cam.gameObject.GetComponent<HDAdditionalCameraData>();
    3. HDCam.antialiasing = mode.AntialiasingMode; // dynamicResolutionType > 0?mode.AntialiasingMode : qualityController.antiAliasingMode;
    4. HDCam.TAAQuality = mode.TAAQualityLevel;
    5. switch (dynamicResolutionType)
    6. {
    7.     case DynamicResolutionType.None:
    8.         HDCam.allowDeepLearningSuperSampling = false;
    9.         HDCam.allowDynamicResolution = false;
    10.         HDCam.antialiasing = useTAA ? HDAdditionalCameraData.AntialiasingMode.TemporalAntialiasing : HDAdditionalCameraData.AntialiasingMode.FastApproximateAntialiasing;
    11.         break;                
    12.     case DynamicResolutionType.DLSS:
    13.         HDCam.allowDynamicResolution = true;
    14.         HDCam.allowDeepLearningSuperSampling = true;
    15.         HDCam.deepLearningSuperSamplingUseCustomQualitySettings = true;
    16.         HDCam.deepLearningSuperSamplingQuality = mode.QualityMode;
    17.         HDCam.deepLearningSuperSamplingUseCustomAttributes = true;
    18.         HDCam.deepLearningSuperSamplingSharpening = 1;
    19.         break;
    20.     case DynamicResolutionType.TAAU:
    21.         HDCam.allowDynamicResolution = true;
    22.         HDCam.allowDeepLearningSuperSampling = false;
    23.         break;
    24. }
    This is code taken out of context, but the idea is to use HDAdditionalCameraData to switch DLSS.
    colinleet likes this.