docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SkyRenderer

    Base class for sky rendering.

    Inheritance
    object
    SkyRenderer
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
    Syntax
    public abstract class SkyRenderer

    Fields

    SupportDynamicSunLight

    Determines if the sky should be rendered when the sun light changes.

    Declaration
    public bool SupportDynamicSunLight
    Field Value
    Type Description
    bool

    Methods

    Build()

    Called on startup. Create resources used by the renderer (shaders, materials, etc).

    Declaration
    public abstract void Build()

    Cleanup()

    Called on cleanup. Release resources used by the renderer.

    Declaration
    public abstract void Cleanup()

    GetSkyIntensity(SkySettings, DebugDisplaySettings)

    Returns exposure setting for the provided SkySettings.

    Declaration
    protected static float GetSkyIntensity(SkySettings skySettings, DebugDisplaySettings debugSettings)
    Parameters
    Type Name Description
    SkySettings skySettings

    SkySettings for which exposure is required.

    DebugDisplaySettings debugSettings

    Current debug display settings

    Returns
    Type Description
    float

    Returns SkySetting exposure.

    PreRenderSky(BuiltinSkyParameters)

    Preprocess for rendering the sky. Called before the DepthPrePass operations

    Declaration
    public virtual void PreRenderSky(BuiltinSkyParameters builtinParams)
    Parameters
    Type Name Description
    BuiltinSkyParameters builtinParams

    Engine parameters that you can use to render the sky.

    PreRenderSky(BuiltinSkyParameters, bool, bool)

    Preprocess for rendering the sky. Called before the DepthPrePass operations

    Declaration
    [Obsolete("Please override PreRenderSky(BuiltinSkyParameters) instead.")]
    public virtual void PreRenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap, bool renderSunDisk)
    Parameters
    Type Name Description
    BuiltinSkyParameters builtinParams

    Engine parameters that you can use to render the sky.

    bool renderForCubemap

    Pass in true if you want to render the sky into a cubemap for lighting. This is useful when the sky renderer needs a different implementation in this case.

    bool renderSunDisk

    If the sky renderer supports the rendering of a sun disk, it must not render it if this is set to false.

    RenderSky(BuiltinSkyParameters, bool, bool)

    Implements actual rendering of the sky. HDRP calls this when rendering the sky into a cubemap (for lighting) and also during main frame rendering.

    Declaration
    public abstract void RenderSky(BuiltinSkyParameters builtinParams, bool renderForCubemap, bool renderSunDisk)
    Parameters
    Type Name Description
    BuiltinSkyParameters builtinParams

    Engine parameters that you can use to render the sky.

    bool renderForCubemap

    Pass in true if you want to render the sky into a cubemap for lighting. This is useful when the sky renderer needs a different implementation in this case.

    bool renderSunDisk

    If the sky renderer supports the rendering of a sun disk, it must not render it if this is set to false.

    RequiresPreRender(SkySettings)

    Whether the PreRenderSky step is required or not.

    Declaration
    public virtual bool RequiresPreRender(SkySettings skySettings)
    Parameters
    Type Name Description
    SkySettings skySettings

    Sky setting for the current sky.

    Returns
    Type Description
    bool

    True if the sky needs a pre-render pass.

    RequiresPreRenderSky(BuiltinSkyParameters)

    Whether the PreRenderSky step is required.

    Declaration
    [Obsolete("Please implement RequiresPreRender instead")]
    public virtual bool RequiresPreRenderSky(BuiltinSkyParameters builtinParams)
    Parameters
    Type Name Description
    BuiltinSkyParameters builtinParams

    Engine parameters that you can use to render the sky.

    Returns
    Type Description
    bool

    True if the PreRenderSky step is required.

    SetGlobalSkyData(CommandBuffer, BuiltinSkyParameters)

    Setup global parameters for the sky renderer.

    Declaration
    public virtual void SetGlobalSkyData(CommandBuffer cmd, BuiltinSkyParameters builtinParams)
    Parameters
    Type Name Description
    CommandBuffer cmd

    Command buffer provided to setup shader constants.

    BuiltinSkyParameters builtinParams

    Sky system builtin parameters.

    Update(BuiltinSkyParameters)

    HDRP calls this function once every frame. Implement it if your SkyRenderer needs to iterate independently of the user defined update frequency (see SkySettings UpdateMode).

    Declaration
    protected virtual bool Update(BuiltinSkyParameters builtinParams)
    Parameters
    Type Name Description
    BuiltinSkyParameters builtinParams

    Engine parameters that you can use to update the sky.

    Returns
    Type Description
    bool

    True if the update determines that sky lighting needs to be re-rendered. False otherwise.

    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)