Class ScreenSpaceLensFlare
A volume component that holds settings for the Screen Space Lens Flare effect.
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
Syntax
[Serializable]
[VolumeComponentMenu("Post-processing/Screen Space Lens Flare")]
[SupportedOnRenderPipeline(typeof(HDRenderPipelineAsset))]
public class ScreenSpaceLensFlare : VolumeComponent, IApplyRevertPropertyContextMenuItemProvider, IPostProcessComponent
Constructors
ScreenSpaceLensFlare()
Default constructor for the lens flare volume component.
Declaration
public ScreenSpaceLensFlare()
Fields
bloomMip
Controls the bloom Mip used as a source for the Lens Flare effect. A high value will result in a blurrier result for all flares.
Declaration
public ClampedIntParameter bloomMip
Field Value
| Type | Description |
|---|---|
| ClampedIntParameter |
chromaticAbberationIntensity
Controls the strength of the Chromatic Aberration effect. The higher the value, the more light is dispersed on the sides of the screen
Declaration
public ClampedFloatParameter chromaticAbberationIntensity
Field Value
| Type | Description |
|---|---|
| ClampedFloatParameter |
chromaticAbberationSampleCount
Controls the number of samples HDRP uses to render the Chromatic Aberration effect. A lower sample number results in better performance.
Declaration
public ClampedIntParameter chromaticAbberationSampleCount
Field Value
| Type | Description |
|---|---|
| ClampedIntParameter |
firstFlareIntensity
Controls the intensity of the Regular Flare sample. Those flares are sampled using scaled screen coordinates.
Declaration
[Header("Flares")]
public MinFloatParameter firstFlareIntensity
Field Value
| Type | Description |
|---|---|
| MinFloatParameter |
intensity
Sets the global intensity of the Screen Space Lens Flare effect. When set to 0, the pass is skipped.
Declaration
public MinFloatParameter intensity
Field Value
| Type | Description |
|---|---|
| MinFloatParameter |
resolution
Specifies the resolution at which the streak effect is evaluated.
Declaration
[SerializeField]
public ScreenSpaceLensFlareResolutionParameter resolution
Field Value
| Type | Description |
|---|---|
| ScreenSpaceLensFlareResolutionParameter |
sampleDimmer
Controls the value by which each additionnal sample is multiplied. A value of 1 keep the same intensities for all samples. A value of 0.7 multiplies the first sample by 1 (0.7 power 0), the second sample by 0.7 (0.7 power 1) and the third sample by 0.49 (0.7 power 2).
Declaration
public ClampedFloatParameter sampleDimmer
Field Value
| Type | Description |
|---|---|
| ClampedFloatParameter |
samples
Controls the number of times the flare effect is repeated for each flare type (regular, reversed, warped). This parameter has a strong impact on performance.
Declaration
public ClampedIntParameter samples
Field Value
| Type | Description |
|---|---|
| ClampedIntParameter |
scale
Controls the scale at which the flares are sampled. This parameter only impacts regular, reversed and warped flares.
Declaration
public ClampedFloatParameter scale
Field Value
| Type | Description |
|---|---|
| ClampedFloatParameter |
secondaryFlareIntensity
Controls the intensity of the Reversed Flare sample. Those flares are sampled using scaled and flipped screen coordinates.
Declaration
public MinFloatParameter secondaryFlareIntensity
Field Value
| Type | Description |
|---|---|
| MinFloatParameter |
spectralLut
Specifies a Texture which HDRP uses to shift the hue of chromatic aberrations. If null, HDRP creates a default texture.
Declaration
[Header("Chromatic Abberation")]
public Texture2DParameter spectralLut
Field Value
| Type | Description |
|---|---|
| Texture2DParameter |
startingPosition
Controls the starting position of the flares in screen space relative to their source. This parameter only impacts regular, reversed and warped flares.
Declaration
public ClampedFloatParameter startingPosition
Field Value
| Type | Description |
|---|---|
| ClampedFloatParameter |
streaksIntensity
Controls the intensity of streaks effect. This effect has an impact on performance when above zero. When this intensity is zero, this effect is not evaluated to save costs.
Declaration
[Header("Streaks")]
public MinFloatParameter streaksIntensity
Field Value
| Type | Description |
|---|---|
| MinFloatParameter |
streaksLength
Controls the length of streaks effect. A value of one creates streaks about the width of the screen.
Declaration
public ClampedFloatParameter streaksLength
Field Value
| Type | Description |
|---|---|
| ClampedFloatParameter |
streaksOrientation
Controls the orientation of streaks effect in degrees. A value of 0 produces horizontal streaks.
Declaration
public FloatParameter streaksOrientation
Field Value
| Type | Description |
|---|---|
| FloatParameter |
streaksThreshold
Controls the threshold of horizontal streak effect. A high value makes the effect more localised on the high intensity areas of the screen.
Declaration
public ClampedFloatParameter streaksThreshold
Field Value
| Type | Description |
|---|---|
| ClampedFloatParameter |
tintColor
Sets the color used to tint all the flares.
Declaration
public ColorParameter tintColor
Field Value
| Type | Description |
|---|---|
| ColorParameter |
vignetteEffect
Controls the intensity of the vignette effect to occlude the Lens Flare effect at the center of the screen. This parameter only impacts regular, reversed and warped flares.
Declaration
public ClampedFloatParameter vignetteEffect
Field Value
| Type | Description |
|---|---|
| ClampedFloatParameter |
warpedFlareIntensity
Controls the intensity of the Warped Flare sample. Those flares are sampled using polar screen coordinates.
Declaration
public MinFloatParameter warpedFlareIntensity
Field Value
| Type | Description |
|---|---|
| MinFloatParameter |
warpedFlareScale
Sets the scale of the Warped Flare sample. A value of 1,1 will keep this flare circular.
Declaration
public Vector2Parameter warpedFlareScale
Field Value
| Type | Description |
|---|---|
| Vector2Parameter |
Methods
IsActive()
Mandatory function, cannot have an Override without it
Declaration
public bool IsActive()
Returns
| Type | Description |
|---|---|
| bool |
IsStreaksActive()
Returns true is streakIntensity is above zero.
Declaration
public bool IsStreaksActive()
Returns
| Type | Description |
|---|---|
| bool |