How to Enable and Manage Upscaling Options (DLSS, FSR2, ...) in Unity HDRP with Quality Settings?

I’m working on creating a settings menu in Unity 6 with HDRP and want to include Upscale options like DLSS, FSR2, FSR, STP and TAA Upscale. However, I’m having trouble figuring out how to activate these options via code and adjust quality settings (like quality, performance …).

I can access only DLSS and FSR2 through HDAdditionalCameraData where I can allow them and set the quality to custom, but there is also has issue. When I try to disable DLSS and enable FSR2 during runtime, the whole project crashes.

To clarify, Dynamic Resolution is enabled in both the camera and settings, and DLSS, FSR2, and STP are available in the Advanced Upscalers by Priority.

I’d really appreciate it if anyone could share some example code or documentation on how to properly handle this.

My Unity version is 6000.0.29f1 (HDRP: 17.0.3)

I just did something similar the other day, to find the answer I asked Grok on X :grinning:

that’s definately a bug, issue tracker ticket needed

Camera.main.GetComponent<HDAdditionalCameraData>().deepLearningSuperSamplingQuality = 2(Q), 1(B), 0(P), 3(UP);
Camera.main.GetComponent<HDAdditionalCameraData>().fidelityFX2SuperResolutionQuality = 0(Q), 1(B), 2(P), 3(UP);
DynamicResolutionHandler.SetDynamicResScaler(delegate () { return 66; }, DynamicResScalePolicyType.ReturnsPercentage);

Untick force screen percentage from HDRP asset settings if it’s on, and adjust min and max percentage to your needs in order this to work

Sorry for the late reply, I was busy. Thanks for the reply. I reported a bug on December 22nd but there was no progress (still open). However, I will test again after updating my Unity version

It still crashes on .29, if you post tracker link here I will vote up

My Bug Report cannot be viewed on the Issue Tracker. Currently it can only be viewed on the Unity Bug Reporting Portal and there the Status is Open and no progress

I found something similar: Unity Issue Tracker - Crash on AMDUnityPlugin.DLL in specific built project when using FSR2 upscaler

1 Like