I was wondering if it is possible to change the quality of the HDPipeline via script during runtime.
I know you can still change the quality of the textures using SetQualityLevel, but can you do the same with everything else in the HDPipeline? And also, can you change the quality settings of the Post Processing for things like the anti-aliasing during runtime?
HDRP asset where all the settings happen can be change at runtime, but it may or not work depends on what is change.
Anything that is a āsupportedā features canāt be tweak at few exception. We use that to remove shader variants, so for example if shadowmask are removed, you canāt enable them by swapping HDRP asset at runtime.
However some other stuff like MSAA or high quality SSS for example can be change at runtime but require to recreate the HDRenderPipeline. Overall it is best to rely on FrameSettings for āQualityā control than HDRP asset change.
We plan in the future to support low, medium, high quality HDRP asset that can be bundled with corresponding shaders, but this work havenāt start yet. Regarding Postprocess. In V3 integrated in 2019.1 everything is controllable at runtime, so the quality can be dynamic.
@SebLagarde
Hi, iām developing Materialize, originally from Bounding Box Software,
Iām having inconsistent results changing the graphics configurations.
What iām doing at the moment and is working is this:
private IEnumerator UpdateQuality()
{
if (Application.isEditor) yield break;
var hdRenderPipelineAsset = GetRpQualityAsset();
if (GraphicsSettings.renderPipelineAsset == hdRenderPipelineAsset) yield break;
Logger.Log("Changing quality to " + GraphicsQuality);
GraphicsSettings.renderPipelineAsset = null;
yield return null;
switch (GraphicsQuality)
{
case ProgramEnums.GraphicsQuality.High:
QualitySettings.SetQualityLevel(2);
break;
case ProgramEnums.GraphicsQuality.Medium:
QualitySettings.SetQualityLevel(1);
break;
case ProgramEnums.GraphicsQuality.Low:
QualitySettings.SetQualityLevel(0);
break;
default:
throw new ArgumentOutOfRangeException();
}
yield return null;
GraphicsSettings.renderPipelineAsset = hdRenderPipelineAsset;
yield return new WaitForSeconds(0.8f);
}
private static HDRenderPipelineAsset GetRpQualityAsset()
{
HDRenderPipelineAsset hdRenderPipelineAsset;
switch (Instance.GraphicsQuality)
{
case ProgramEnums.GraphicsQuality.High:
hdRenderPipelineAsset = Instance.HighQualityAsset;
break;
case ProgramEnums.GraphicsQuality.Medium:
hdRenderPipelineAsset = Instance.MediumQualityAsset;
break;
case ProgramEnums.GraphicsQuality.Low:
hdRenderPipelineAsset = Instance.LowQualityAsset;
break;
default:
throw new ArgumentOutOfRangeException();
}
return hdRenderPipelineAsset;
}
If i just change the pipeline asset, it breaks the render and camera gets black with lots of errors.
If i change to null, then wait a frame, then put the new one, it works, almost always, but in some computers its causing troubles.
My question, can you tell me the best way to do it?
When you say change the asset you say modify or change like iām doing?
@SebLagarde Could we get an update on the issue with QualitySettings.SetQualityLevel(q, true); please? Calling this under the HDRP 7.1.7 (as well as under 5.16, so I presume everything in between) just turns the screen black. I can sometimes get it back to rendering by disabling and reenabling all volumes in the scene. But whatās happening here when we call QualitySettings.SetQualityLevel()? Should we not be calling this under HDRP? Is there another wat to set quality that does the right things with respect to HDRP?
Hi I have a question ā¦ is there a way to lower the quality to the fog or would just lowering the quality of the shadows lower the quality of the fog?
In HDRP 10 for Unity 2020.2, they added the ability to lower the Fog quality in the advanced settings for the Fog. Not sure about a backport to HDRP 9 for 2020.1 but itās there for HDRP 10
Really? Create an asset per config diff?
So if I want to have configurable MSAA and render scale, I would just have to create 4 assets for MSAA setting * predefined number of assets for render scale, letās say 4. 16 assets. Letās add shadows on/off. 32 assets.
So do we have this low, medium, high yet? It is so painful trying to find out how to setup quality levels in HDRP (any new pipeline?) at runtime.
It is a basic feature of PC games that they have lots of graphics options so why is it so hard to change them at runtime with HDRP?
Iām pretty certain that you could swap different quality HDRP assets as long as it has existed. Same with most of the HDRP settings. What is missing (?) is a way to communicate to shaders / shader graphs that your specific SRP asset wants to use variant x from the shader automatically but even this you can implement other ways today if you want to.
As for Low, Medium, High HDRP asset presets, you can do this by just putting different HDRP asset to Quality Settings today, you can put a different HDRP asset for each of your quality tiers. New HDRP 10 template scene (available on recent 2020.2 betas and above) also uses this type of setup out of the box.
I tried to just activate/deactivate global volumes for ālevelsā but it is dodgy as you can not have say shadows in one and not in another, u end up having a shadows with 0 distance to turn off!
(HDRP can run on very low hardware with right settings!)
I can slim HDRP by huge margin on my high end rig, making it run like only 30% of the cost Iād get on the default settings. But unfortunately it doesnāt quite scale low enough still for truly weaker hardware as HDRP rendering itself has some overhead you simply canāt get rid of even if you dropped every feat on HDRP asset and frame settings. Even if you see big gains on system x, Iād recommend always to also test on your targeted min spec gear as well.
If you really want to target weak PCās today with Unity, URP and built-in renderers are the only practical choices as HDRP canāt scale down even closely as much like these two can.
Hi everyone, what is the way to implement SSAA in HDRP ? HDRP asset has a dynamic resolution field but it is clamped to 100%. I would like to multiply it by 2 or 4 to get rid of aliasing. URP Asset has a render scale field (it can go to 2) but HDRP has none if I am not wrong.
using UnityEngine.Rendering.HighDefinition;
//with this script on the camera:
GetComponent<HDAdditionalCameraData>().antialiasing = HDAdditionalCameraData.AntialiasingMode.TemporalAntialiasing;
GetComponent<HDAdditionalCameraData>().antialiasing = HDAdditionalCameraData.AntialiasingMode.FastApproximateAntialiasing;
GetComponent<HDAdditionalCameraData>().antialiasing = HDAdditionalCameraData.AntialiasingMode.None;
GetComponent<HDAdditionalCameraData>().antialiasing = HDAdditionalCameraData.AntialiasingMode.SubpixelMorphologicalAntiAliasing;