docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LensFlareCommonSRP

    Common code for all Data-Driven Lens Flare used

    Inheritance
    object
    LensFlareCommonSRP
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public sealed class LensFlareCommonSRP

    Fields

    Name Description
    maxLensFlareWithOcclusion

    Max lens-flares-with-occlusion supported

    maxLensFlareWithOcclusionTemporalSample

    With TAA Occlusion jitter depth, thought frame on HDRP. So we do a "unanimity vote" for occlusion thought 'maxLensFlareWithOcclusionTemporalSample' frame Important to keep this value maximum of 8 If this value change that could implies an implementation modification on: com.unity.render-pipelines.high-definition/Runtime/PostProcessing/Shaders/LensFlareMergeOcclusionDataDriven.compute

    mergeNeeded

    Set to 1 to enable temporal sample merge. Set to 0 to disable temporal sample merge (must support 16 bit textures, and the occlusion merge must be written in the last texel (vertical) of the lens flare texture.

    occlusionRT

    occlusion texture either provided or created automatically by the SRP for lens flare. Texture width is the max number of lens flares that have occlusion (x axis the lens flare index). y axis is the number of samples (maxLensFlareWithOcclusionTemporalSample) plus the number of merge results. Merge results must be done by the SRP and stored in the [(lens flareIndex), (maxLensFlareWithOcclusionTemporalSample + 1)] coordinate. Note: It's not supported on OpenGL3 and OpenGLCore

    Properties

    Name Description
    Instance

    Current unique instance

    Methods

    Name Description
    AddData(LensFlareComponentSRP)

    Add a new lens flare component on the pool.

    ComputeOcclusion(Material, Camera, float, float, bool, float, float, bool, Vector3, Matrix4x4, CommandBuffer, bool, bool, Texture, Texture, int, int, int, int, int, int, int, int, int, int, int)

    Effective Job of drawing the set of Lens Flare registered

    Dispose()

    Disposal function, must be called by the SRP to release all internal textures.

    DoLensFlareDataDrivenCommon(Material, Camera, float, float, bool, float, float, bool, Vector3, Matrix4x4, CommandBuffer, bool, bool, Texture, Texture, RenderTargetIdentifier, Func<Light, Camera, Vector3, float>, int, int, int, int, int, int, int, int, int, int, int, int, bool)

    Effective Job of drawing the set of Lens Flare registered

    DoLensFlareScreenSpaceCommon(Material, Camera, float, float, Color, Texture, Texture, Texture, Texture, Vector4, Vector4, Vector4, Vector4, Vector4, CommandBuffer, RTHandle, int, int, int, int, int, int, int, int, int, int, int, bool)

    Effective Job of drawing Lens Flare Screen Space.

    GetFlareData0(Vector2, Vector2, Vector2, Vector2, float, float, float, Vector2, bool)

    Compute internal parameters needed to render single flare

    Initialize()

    Initialization function which must be called by the SRP.

    IsCloudLayerOpacityNeeded(Camera)

    Check if at least one LensFlareComponentSRP request CloudLayer opacity

    IsEmpty()

    Check if we have at least one Lens Flare added on the pool

    IsOcclusionRTCompatible()

    Check if we can use an OcclusionRT

    RemoveData(LensFlareComponentSRP)

    Remove a lens flare data which exist in the pool.

    ShapeAttenuationAreaDiscLight(Vector3, Vector3)

    Attenuation by Light Shape for Area Light with Disc Shape

    ShapeAttenuationAreaRectangleLight(Vector3, Vector3)

    Attenuation by Light Shape for Area Light with Rectangular Shape

    ShapeAttenuationAreaTubeLight(Vector3, Vector3, float, Camera)

    Attenuation by Light Shape for Area Light with Tube Shape

    ShapeAttenuationDirLight(Vector3, Vector3)

    Attenuation by Light Shape for Directional Light

    ShapeAttenuationPointLight()

    Attenuation by Light Shape for Point Light

    ShapeAttenuationSpotBoxLight(Vector3, Vector3)

    Attenuation by Light Shape for Spot Light with Box Shape

    ShapeAttenuationSpotConeLight(Vector3, Vector3, float, float)

    Attenuation by Light Shape for Spot Light with Cone Shape

    ShapeAttenuationSpotPyramidLight(Vector3, Vector3)

    Attenuation by Light Shape for Spot Light with Pyramid Shape

    Extension Methods

    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)