Class LensFlareComponentSRP
Data-Driven Lens Flare can be added on any gameobject
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
[ExecuteAlways]
[AddComponentMenu("Rendering/Lens Flare (SRP)")]
public sealed class LensFlareComponentSRP : MonoBehaviour
Fields
| Name | Description |
|---|---|
| allowOffScreen | If allowOffScreen is true then If the lens flare is outside the screen we still emit the flare on screen |
| attenuationByLightShape | If component attached to a light, attenuation the lens flare per light type |
| distanceAttenuationCurve | Attenuation by distance |
| intensity | Intensity |
| maxAttenuationDistance | Distance used to scale the Distance Attenuation Curve |
| maxAttenuationScale | Distance used to scale the Scale Attenuation Curve |
| occlusionOffset | Z Occlusion Offset allow us to offset the plane where the disc of occlusion is place (closer to camera), value on world space. Useful for instance to sample occlusion outside a light bulb if we place a flare inside the light bulb |
| occlusionRadius | Radius around the light used to occlude the flare (value in world space) |
| occlusionRemapCurve | OcclusionRemapCurve allow the occlusion [from 0 to 1] to be remap with any desired shape. |
| radialScreenAttenuationCurve | Attenuation used radially, which allow for instance to enable flare only on the edge of the screen |
| sampleCount | Random Samples Count used inside the disk with 'occlusionRadius' |
| scale | Global Scale |
| scaleByDistanceCurve | Scale by distance, use the same distance as distanceAttenuationCurve |
| useBackgroundCloudOcclusion | Enable Occlusion using Background Cloud (for instance: CloudLayer) |
| useOcclusion | Enable Occlusion feature |
| volumetricCloudOcclusion | If volumetricCloudOcclusion is true then use the volumetric cloud (on HDRP only) for the occlusion |
Properties
| Name | Description |
|---|---|
| lensFlareData | Lens flare asset used on this component |
Methods
| Name | Description |
|---|---|
| celestialProjectedOcclusionRadius(Camera) | Retrieves the projected occlusion radius from a particular celestial in the infinity plane with an angular radius. This is used for directional lights which require to have consistent occlusion radius regardless of the near/farplane configuration. |