docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UniversalRenderPipeline

    The main class for the Universal Render Pipeline (URP).

    Inheritance
    object
    RenderPipeline
    UniversalRenderPipeline
    Inherited Members
    RenderPipeline.SupportsRenderRequest<RequestData>(Camera, RequestData)
    RenderPipeline.SubmitRenderRequest<RequestData>(Camera, RequestData)
    RenderPipeline.disposed
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Rendering.Universal
    Assembly: Unity.RenderPipelines.Universal.Runtime.dll
    Syntax
    public sealed class UniversalRenderPipeline : RenderPipeline

    Constructors

    UniversalRenderPipeline(UniversalRenderPipelineAsset)

    Creates a new UniversalRenderPipeline instance.

    Declaration
    public UniversalRenderPipeline(UniversalRenderPipelineAsset asset)
    Parameters
    Type Name Description
    UniversalRenderPipelineAsset asset

    The UniversalRenderPipelineAsset asset to initialize the pipeline.

    See Also
    RenderPassEvent

    Fields

    k_ShaderTagName

    The shader tag used in the Universal Render Pipeline (URP)

    Declaration
    public const string k_ShaderTagName = "UniversalPipeline"
    Field Value
    Type Description
    string

    Properties

    asset

    Returns the current render pipeline asset for the current quality setting. If no render pipeline asset is assigned in QualitySettings, then returns the one assigned in GraphicsSettings.

    Declaration
    public static UniversalRenderPipelineAsset asset { get; }
    Property Value
    Type Description
    UniversalRenderPipelineAsset

    defaultSettings

    The default Render Pipeline Global Settings.

    Declaration
    public override RenderPipelineGlobalSettings defaultSettings { get; }
    Property Value
    Type Description
    RenderPipelineGlobalSettings
    Overrides
    UnityEngine.Rendering.RenderPipeline.defaultSettings

    maxNumIterationsEnclosingSphere

    The max number of iterations allowed calculating enclosing sphere.

    Declaration
    public static int maxNumIterationsEnclosingSphere { get; }
    Property Value
    Type Description
    int

    maxPerObjectLights

    The max number of lights that can be shaded per object (in the for loop in the shader).

    Declaration
    public static int maxPerObjectLights { get; }
    Property Value
    Type Description
    int

    maxRenderScale

    The maximum value allowed for render scale.

    Declaration
    public static float maxRenderScale { get; }
    Property Value
    Type Description
    float

    maxShadowBias

    The maximum amount of bias allowed for shadows.

    Declaration
    public static float maxShadowBias { get; }
    Property Value
    Type Description
    float

    maxVisibleAdditionalLights

    The max number of additional lights that can can affect each GameObject.

    Declaration
    public static int maxVisibleAdditionalLights { get; }
    Property Value
    Type Description
    int

    minRenderScale

    The minimum value allowed for render scale.

    Declaration
    public static float minRenderScale { get; }
    Property Value
    Type Description
    float

    Methods

    Dispose(bool)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool disposing
    Overrides
    RenderPipeline.Dispose(bool)

    GetLightAttenuationAndSpotDirection(LightType, float, Matrix4x4, float, float?, out Vector4, out Vector4)

    Calculates the attenuation for a given light and also direction for spot lights.

    Declaration
    public static void GetLightAttenuationAndSpotDirection(LightType lightType, float lightRange, Matrix4x4 lightLocalToWorldMatrix, float spotAngle, float? innerSpotAngle, out Vector4 lightAttenuation, out Vector4 lightSpotDir)
    Parameters
    Type Name Description
    LightType lightType

    The type of light.

    float lightRange

    The range of the light.

    Matrix4x4 lightLocalToWorldMatrix

    The local to world light matrix.

    float spotAngle

    The spotlight angle.

    float? innerSpotAngle

    The spotlight inner angle.

    Vector4 lightAttenuation

    The light attenuation.

    Vector4 lightSpotDir

    The spot light direction.

    InitializeLightConstants_Common(NativeArray<VisibleLight>, int, out Vector4, out Vector4, out Vector4, out Vector4, out Vector4)

    Initializes common light constants.

    Declaration
    public static void InitializeLightConstants_Common(NativeArray<VisibleLight> lights, int lightIndex, out Vector4 lightPos, out Vector4 lightColor, out Vector4 lightAttenuation, out Vector4 lightSpotDir, out Vector4 lightOcclusionProbeChannel)
    Parameters
    Type Name Description
    NativeArray<VisibleLight> lights

    List of lights to iterate.

    int lightIndex

    The index of the light.

    Vector4 lightPos

    The position of the light.

    Vector4 lightColor

    The color of the light.

    Vector4 lightAttenuation

    The attenuation of the light.

    Vector4 lightSpotDir

    The direction of the light.

    Vector4 lightOcclusionProbeChannel

    The occlusion probe channel for the light.

    IsGameCamera(Camera)

    Checks if a camera is a game camera.

    Declaration
    public static bool IsGameCamera(Camera camera)
    Parameters
    Type Name Description
    Camera camera

    Camera to check state from.

    Returns
    Type Description
    bool

    true if given camera is a game camera, false otherwise.

    IsRenderRequestSupported<RequestData>(Camera, RequestData)

    Check whether RenderRequest is supported

    Declaration
    protected override bool IsRenderRequestSupported<RequestData>(Camera camera, RequestData data)
    Parameters
    Type Name Description
    Camera camera
    RequestData data
    Returns
    Type Description
    bool
    Type Parameters
    Name Description
    RequestData
    Overrides
    UnityEngine.Rendering.RenderPipeline.IsRenderRequestSupported<RequestData>(UnityEngine.Camera, RequestData)

    ProcessRenderRequests<RequestData>(ScriptableRenderContext, Camera, RequestData)

    Process a render request

    Declaration
    protected override void ProcessRenderRequests<RequestData>(ScriptableRenderContext context, Camera camera, RequestData renderRequest)
    Parameters
    Type Name Description
    ScriptableRenderContext context
    Camera camera
    RequestData renderRequest
    Type Parameters
    Name Description
    RequestData
    Overrides
    UnityEngine.Rendering.RenderPipeline.ProcessRenderRequests<RequestData>(UnityEngine.Rendering.ScriptableRenderContext, UnityEngine.Camera, RequestData)

    Render(ScriptableRenderContext, List<Camera>)

    Declaration
    protected override void Render(ScriptableRenderContext renderContext, List<Camera> cameras)
    Parameters
    Type Name Description
    ScriptableRenderContext renderContext
    List<Camera> cameras
    Overrides
    RenderPipeline.Render(ScriptableRenderContext, List<Camera>)

    Render(ScriptableRenderContext, Camera[])

    Declaration
    protected override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
    Parameters
    Type Name Description
    ScriptableRenderContext renderContext
    Camera[] cameras
    Overrides
    RenderPipeline.Render(ScriptableRenderContext, Camera[])

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)