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 |
---|---|
allow |
If allowOffScreen is true then If the lens flare is outside the screen we still emit the flare on screen |
attenuation |
If component attached to a light, attenuation the lens flare per light type |
distance |
Attenuation by distance |
intensity | Intensity |
max |
Distance used to scale the Distance Attenuation Curve |
max |
Distance used to scale the Scale Attenuation Curve |
occlusion |
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 |
occlusion |
Radius around the light used to occlude the flare (value in world space) |
occlusion |
OcclusionRemapCurve allow the occlusion [from 0 to 1] to be remap with any desired shape. |
radial |
Attenuation used radially, which allow for instance to enable flare only on the edge of the screen |
sample |
Random Samples Count used inside the disk with 'occlusionRadius' |
scale | Global Scale |
scale |
Scale by distance, use the same distance as distanceAttenuationCurve |
use |
Enable Occlusion using Background Cloud (for instance: CloudLayer) |
use |
Enable Occlusion feature |
volumetric |
If volumetricCloudOcclusion is true then use the volumetric cloud (on HDRP only) for the occlusion |
Properties
Name | Description |
---|---|
lens |
Lens flare asset used on this component |
Methods
Name | Description |
---|---|
celestial |
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. |