Since some of the old settings are now moved into Pipeline Asset, this removes the option to set different shadow settings in the Unity’s regular quality settings.
For example, I’d want to alter shadow type, cascade amount, distance and resolution based on the quality setting. How is this supposed to be handled from now on?
From now on we are migrating settings towards the asset itself.
When you make a game / title you can use multiple pipeline assets and switch them at runtime, for example you could have a HQ asset that has high shadow resolution, and a LQ asset that has no shadows.
using UnityEngine;
using UnityEngine.Experimental.Rendering.LightweightPipeline;
using UnityEngine.Rendering;
public class SwitchQuality : MonoBehaviour
{
public LightweightPipelineAsset lowQuality;
public LightweightPipelineAsset highQuality;
void OnGUI()
{
if (GUILayout.Button("Low Quality"))
GraphicsSettings.renderPipelineAsset = lowQuality;
if (GUILayout.Button("High Quality"))
GraphicsSettings.renderPipelineAsset = highQuality;
var lwAsset = GraphicsSettings.renderPipelineAsset as LightweightPipelineAsset;
if (lwAsset == null)
return;
if (lwAsset.ShadowSetting == ShadowType.SOFT_SHADOWS && GUILayout.Button("Shadows Off"))
lwAsset.ShadowSetting = ShadowType.NO_SHADOW;
else if (lwAsset.ShadowSetting == ShadowType.NO_SHADOW && GUILayout.Button("Shadows On"))
lwAsset.ShadowSetting = ShadowType.SOFT_SHADOWS;
}
}
Few examples:
switching between presets (high / low quality)
switching shadows on / off on CURRENT pipeline.
This is much more flexible than the existing quality / graphics settings and can be tailored to your game.
Didn’t realise this was a thing! so perhaps using HD can also support a mid-platform like switch? We are developing for PS4/XB1/Desktop and the switch is a worry. Using LW is a bit too spartan for the majority platform leaving switch out when we want to include it…
Here is what I took from several forum posts where UT staff was answering SRP questions…
UT wrote in various threads that HD and LW are not compatible. Assets (shaders, materials, …) that have been created for HD are unlikely to work in LW.
Whether you use HD or LW is a decision you make at the beginning of the project, similar to Gamma vs Linear lighting decision, where you have to author assets differently; you don’t switch in the middle of the project, unless you want to redo those assets.
Considering this information, technically it might be possible to assign a completely different SRP at run-time (idk), but assets would be incompatible.
I know this was the answer I got on the other thread too but I don’t actually agree with the presented points. If you stick with PBR on your assets, you should be able to use them as is on any PBR pipepline without redoing them. Sure you are likely to need tweaks for the lighting etc values but you could solve that by having your light rigs in a sublevel and then stream in the variant of it based on the actual render pipeline.
But that being said, I think there are technical issues on swapping the whole SRP runtime which will prevent swapping between HD and LW (unless one somehow managed to embedded them both into one SRP).
What Tim C explained probably meant that you can make as many pipeline assets from the SAME base SRP. So you can have like 5 different setups of LW render pipeline but not mix them with few from HD and few from LW.
Actually, as far as I understand this thread, Tim-C didn’t say you can switch pipeline on runtime, you can switch Quality Settings on assets and on systems.
Also in theory nothing will stop you to switch pipeline either, it’s just won’t look as good as would if you stick to your pipeline and develop all of your assets the pipeline itself in mind.
The code he wrote also shows that it’s switching between two different quality levels of the same SRP
And as far as PBR switching to PBR yes that should be possible but keep in mind this isn’t about PBR but the actual Render Pipelines, therefore, each render pipeline is written to work with shaders a certain way and render a certain way. Otherwise, it would be the same as current Renderer with LW Pipe as a low preset and HD Pipe as higher quality.
What LurkingNinjaDev says is the same way I understand this:
You can have as many HD assets or LW assets in your project with different settings. Think like quality presets in many games or the one in standard unity launcher. You can have “Fantastic” settings (Fantastic_HDPipeline.asset), “Beautifull” settings (Beautifull_HDPipeline.asset), “Medium”, “Low”, etc.
Doesn’t matter. They are all just variations of the same pipeline asset, just tweeked to achieve different performance.
Switching between completly different pipelines however, based on other threads, isn’t supported. And makes sense: The whole purpose of having pipelines is that you can have your unique way of rendering designed to your project only. Whether to be a “cell-shaded” project, or “underwater effect” project, or “realistic” project, etc.
Actually it’s a huge regression IMO, you used to be able to swap between forward and deferred on fly even with old Unity renderer (it’s just a flag on the camera). Also other engines like UE4 let you swap into special lightweight renderer on low end settings and use the regular one for high end. There are clear advantages for this, especially if you have a desktop renderer that’s using deferred (like mentioned, you could want lighter forward renderer for low end that strips almost every fancier functionality out and possible one for VR that does MSAA).
Of course you can try to scale one pipeline down by it’s settings but that will not get you as far as the other routes. I actually thought SRP was about flexibility but this is one part that’s working against it.
Having render pipelines are awesome. Before long, users will extend the lightweight one, or extend the HD one, or make brand new ones. Unity isn’t finished yet (this is still experimental, not even beta) with it’s LW and HD variants.
The legacy renderer (the all-purpose one built in) will go away once it’s use cases are covered. And it’s use cases will be covered first for sure. You will get what you want with SRP and Legacy will be removed in time. I would expect legacy renderer already has all its features frozen and is in maintenance phase.
You can still create your own pipeline that switches between forward and deferred rendering techniques depending on configuration, if that’s what you want to do. You would need to author all your content in a way that is suitable to both approaches.
What you’re describing isn’t a property of SRP, it’s a property of the pipelines that the team is building for it. You don’t have to use those pipelines if they don’t meet your needs - or you can customise their source code.
All is said :), just want to add that as an example of what Richard say, HD support both deferred and forward (you can be fully forward if you setup it for this). It is up to the render pipeline implementer to provide the lighting architecture, scale and platform support he/she desired.