Class UniversalRenderPipelineRuntimeShaders
A resource container for shaders used for UniversalRenderPipeline.
Inherited Members
Namespace: UnityEngine.Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
[Serializable]
[SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))]
[CategoryInfo(Name = "R: Runtime Shaders", Order = 1000)]
[HideInInspector]
public class UniversalRenderPipelineRuntimeShaders : IRenderPipelineResources, IRenderPipelineGraphicsSettings
Remarks
You cannot edit these resources through the editor's UI; use the API for advanced changes. Changing this through the API is only allowed in the Editor. In the Player, this raises an error.
Examples
Here is an example of how to get the blit shader used by URP.
using UnityEngine.Rendering;
using UnityEngine.Rendering.Universal;
public static class URPUniversalRendererRuntimeShadersHelper
{
public static Shader blit
{
get
{
var gs = GraphicsSettings.GetRenderPipelineSettings<UniversalRenderPipelineRuntimeShaders>();
if (gs == null) //not in URP
return null;
return gs.coreBlitPS;
}
}
}
Properties
blitHDROverlay
Blit shader used for HDR Overlay.
Declaration
public Shader blitHDROverlay { get; set; }
Property Value
| Type | Description |
|---|---|
| Shader |
See Also
coreBlitColorAndDepthPS
Blit shader used for both Color And Depth blit operation.
Declaration
public Shader coreBlitColorAndDepthPS { get; set; }
Property Value
| Type | Description |
|---|---|
| Shader |
See Also
coreBlitPS
Default blit shader used for blit operation.
Declaration
public Shader coreBlitPS { get; set; }
Property Value
| Type | Description |
|---|---|
| Shader |
See Also
fallbackErrorShader
Fallback shader used when error happens.
Declaration
public Shader fallbackErrorShader { get; set; }
Property Value
| Type | Description |
|---|---|
| Shader |
See Also
samplingPS
Shader used when sampling is required.
Declaration
public Shader samplingPS { get; set; }
Property Value
| Type | Description |
|---|---|
| Shader |
See Also
version
Current version of the resource container. Used only for upgrading a project.
Declaration
public int version { get; }
Property Value
| Type | Description |
|---|---|
| int |