docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CloudRenderer

    Base class for cloud rendering.

    Inheritance
    object
    CloudRenderer
    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 CloudRenderer

    Fields

    SupportDynamicSunLight

    Determines if the clouds 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()

    GetSunLightCookieParameters(CloudSettings, ref CookieParameters)

    Get the parameters for overriding the main directional light cookie for one frame.

    Declaration
    public virtual bool GetSunLightCookieParameters(CloudSettings settings, ref CookieParameters cookieParams)
    Parameters
    Type Name Description
    CloudSettings settings

    Current cloud settings.

    CookieParameters cookieParams

    Overriden values for cookie parameters.

    Returns
    Type Description
    bool

    True if the cookie should be overriden and RenderSunLightCookie should be called.

    PreRenderClouds(BuiltinSkyParameters, bool)

    Preprocess for rendering the clouds. Called before the DepthPrePass operations

    Declaration
    public virtual void PreRenderClouds(BuiltinSkyParameters builtinParams, bool renderForCubemap)
    Parameters
    Type Name Description
    BuiltinSkyParameters builtinParams

    Engine parameters that you can use to render the clouds.

    bool renderForCubemap

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

    RenderClouds(BuiltinSkyParameters, bool)

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

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

    Engine parameters that you can use to render the clouds.

    bool renderForCubemap

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

    RenderSunLightCookie(BuiltinSunCookieParameters)

    HDRP calls this function once every frame where GetSunLightCookieParameters returns true. Implement it if your CloudRenderer needs to render a texture to use for the light cookie (for example for cloud shadow rendering).

    Declaration
    public virtual void RenderSunLightCookie(BuiltinSunCookieParameters builtinParams)
    Parameters
    Type Name Description
    BuiltinSunCookieParameters builtinParams

    Engine parameters that you can use to render the sun light cookie.

    RequiresPreRenderClouds(BuiltinSkyParameters)

    Whether the PreRenderClouds step is required.

    Declaration
    public virtual bool RequiresPreRenderClouds(BuiltinSkyParameters builtinParams)
    Parameters
    Type Name Description
    BuiltinSkyParameters builtinParams

    Engine parameters that you can use to render the clouds.

    Returns
    Type Description
    bool

    True if the PreRenderClouds step is required.

    Update(BuiltinSkyParameters)

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

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

    Engine parameters that you can use to update the clouds.

    Returns
    Type Description
    bool

    True if the update determines that cloud 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)