docs.unity3d.com
    Show / Hide Table of Contents

    Class SkyRenderer

    Base class for sky rendering.

    Inheritance
    Object
    SkyRenderer
    Namespace: UnityEngine.Rendering.HighDefinition
    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
    Boolean

    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
    Single

    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, Boolean, Boolean)

    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.

    Boolean 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.

    Boolean 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, Boolean, Boolean)

    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.

    Boolean 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.

    Boolean renderSunDisk

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

    RequiresPreRenderSky(BuiltinSkyParameters)

    Whether the PreRenderSky step is required.

    Declaration
    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
    Boolean

    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
    Boolean

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

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023