docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class UniversalRenderer

    Default renderer for Universal RP. This renderer is supported on all Universal RP supported platforms. It uses a classic forward rendering strategy with per-object light culling.

    Inheritance
    object
    ScriptableRenderer
    UniversalRenderer
    Implements
    IDisposable
    Inherited Members
    ScriptableRenderer.SupportsCameraStackingType(CameraRenderType)
    ScriptableRenderer.SetCameraMatrices(CommandBuffer, ref CameraData, bool)
    ScriptableRenderer.SetCameraMatrices(CommandBuffer, UniversalCameraData, bool)
    ScriptableRenderer.supportedRenderingFeatures
    ScriptableRenderer.unsupportedGraphicsDeviceTypes
    ScriptableRenderer.Dispose()
    ScriptableRenderer.EnqueuePass(ScriptableRenderPass)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.Universal
    Assembly: Unity.RenderPipelines.Universal.Runtime.dll
    Syntax
    public sealed class UniversalRenderer : ScriptableRenderer, IDisposable

    Constructors

    UniversalRenderer(UniversalRendererData)

    Constructor for the Universal Renderer.

    Declaration
    public UniversalRenderer(UniversalRendererData data)
    Parameters
    Type Name Description
    UniversalRendererData data

    The settings to create the renderer with.

    Properties

    depthPrimingMode

    Property to control the depth priming behavior of the forward rendering path.

    Declaration
    public DepthPrimingMode depthPrimingMode { get; set; }
    Property Value
    Type Description
    DepthPrimingMode

    supportsGPUOcclusion

    Used to determine if this renderer supports the use of GPU occlusion culling.

    Declaration
    public override bool supportsGPUOcclusion { get; }
    Property Value
    Type Description
    bool
    Overrides
    ScriptableRenderer.supportsGPUOcclusion

    Methods

    CreateRenderGraphTexture(RenderGraph, RenderTextureDescriptor, string, bool, FilterMode, TextureWrapMode)

    Utility method to convert RenderTextureDescriptor to TextureHandle and create a RenderGraph texture

    Declaration
    public static TextureHandle CreateRenderGraphTexture(RenderGraph renderGraph, RenderTextureDescriptor desc, string name, bool clear, FilterMode filterMode = FilterMode.Point, TextureWrapMode wrapMode = TextureWrapMode.Clamp)
    Parameters
    Type Name Description
    RenderGraph renderGraph
    RenderTextureDescriptor desc
    string name
    bool clear
    FilterMode filterMode
    TextureWrapMode wrapMode
    Returns
    Type Description
    TextureHandle

    Dispose(bool)

    Called by Dispose(). Override this function to clean up resources in your renderer. Be sure to call this base dispose in your overridden function to free resources allocated by the base.

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

    FinishRendering(CommandBuffer)

    Called upon finishing rendering the camera stack. You can release any resources created by the renderer here.

    Declaration
    public override void FinishRendering(CommandBuffer cmd)
    Parameters
    Type Name Description
    CommandBuffer cmd
    Overrides
    ScriptableRenderer.FinishRendering(CommandBuffer)

    IsOffscreenDepthTexture(ref CameraData)

    Returns if the camera renders to a offscreen depth texture.

    Declaration
    public static bool IsOffscreenDepthTexture(ref CameraData cameraData)
    Parameters
    Type Name Description
    CameraData cameraData

    The camera data for the camera being rendered.

    Returns
    Type Description
    bool

    Returns true if the camera renders to depth without any color buffer. It will return false otherwise.

    IsOffscreenDepthTexture(UniversalCameraData)

    Returns if the camera renders to a offscreen depth texture.

    Declaration
    public static bool IsOffscreenDepthTexture(UniversalCameraData cameraData)
    Parameters
    Type Name Description
    UniversalCameraData cameraData

    The camera data for the camera being rendered.

    Returns
    Type Description
    bool

    Returns true if the camera renders to depth without any color buffer. It will return false otherwise.

    OnBeginRenderGraphFrame()

    Called before recording the render graph. Can be used to initialize resources.

    Declaration
    public override void OnBeginRenderGraphFrame()
    Overrides
    ScriptableRenderer.OnBeginRenderGraphFrame()

    OnEndRenderGraphFrame()

    Called after recording the render graph. Can be used to clean up resources.

    Declaration
    public override void OnEndRenderGraphFrame()
    Overrides
    ScriptableRenderer.OnEndRenderGraphFrame()

    SetupCullingParameters(ref ScriptableCullingParameters, ref CameraData)

    Override this method to configure the culling parameters for the renderer. You can use this to configure if lights should be culled per-object or the maximum shadow distance for example.

    Declaration
    public override void SetupCullingParameters(ref ScriptableCullingParameters cullingParameters, ref CameraData cameraData)
    Parameters
    Type Name Description
    ScriptableCullingParameters cullingParameters

    Use this to change culling parameters used by the render pipeline.

    CameraData cameraData

    Current render state information.

    Overrides
    ScriptableRenderer.SetupCullingParameters(ref ScriptableCullingParameters, ref CameraData)

    SupportedCameraStackingTypes()

    This setting controls if the camera editor should display the camera stack category. If your renderer is not supporting stacking this one should return 0. For the UI to show the Camera Stack widget this must support CameraRenderType.Base. CameraRenderType

    Declaration
    public override int SupportedCameraStackingTypes()
    Returns
    Type Description
    int

    The bitmask of the supported camera render types in the renderer's current state.

    Overrides
    ScriptableRenderer.SupportedCameraStackingTypes()

    SupportsMotionVectors()

    Check if the ScriptableRenderer implements a motion vector pass for temporal techniques. The Camera will check this to enable/disable features and/or apply jitter when required.

    For example, Temporal Anti-aliasing in the Camera settings is enabled only if the ScriptableRenderer can support motion vectors.

    Declaration
    protected override bool SupportsMotionVectors()
    Returns
    Type Description
    bool

    Returns true if the ScriptableRenderer implements a motion vector pass. False otherwise.

    Overrides
    ScriptableRenderer.SupportsMotionVectors()

    Implements

    IDisposable
    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)