Skip to content

Commit a13e423

Browse files
markg-unityEvergreen
authored andcommitted
DOCG-3077 Add and update URP/HDRP lens flare pages
- Restructure and add to the lens flare pages of the URP and HDRP manuals, to help users understand the limitations of the 2 types of lens flare. - Remove unneeded images from the Lens Flare (SRP) Data Asset page - Update the main manual Lens flare page with missing features Jira ticket: https://jira.unity3d.com/browse/DOCG-3077
1 parent fd3e454 commit a13e423

16 files changed

+256
-193
lines changed

Packages/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,13 @@
252252
* [Depth of Field](Post-Processing-Depth-of-Field.md)
253253
* [Film Grain](Post-Processing-Film-Grain.md)
254254
* [Lens Distortion](Post-Processing-Lens-Distortion.md)
255-
* [Lens Flare (SRP)](shared/lens-flare/lens-flare-component.md)
255+
* [Lens flares](shared/lens-flare/lens-flare.md)
256+
* [Choose a lens flare type](shared/lens-flare/choose-a-lens-flare-type.md)
257+
* [Add lens flares](shared/lens-flare/lens-flare-component.md)
258+
* [Add screen space lens flares](shared/lens-flare/Override-Screen-Space-Lens-Flare.md)
259+
* [Lens Flare (SRP) reference](shared/lens-flare/lens-flare-reference.md)
260+
* [Lens Flare (SRP) Data Asset reference](shared/lens-flare/lens-flare-asset.md)
261+
* [Screen Space Lens Flare override reference](shared/lens-flare/reference-screen-space-lens-flare.md)
256262
* [Panini Projection](Post-Processing-Panini-Projection.md)
257263
* [Vignette](Post-Processing-Vignette.md)
258264
* [Motion effects](motion-effects.md)
@@ -304,6 +310,10 @@
304310
* [Lighting environment reference](reference-lighting-environment.md)
305311
* [Ambient Occlusion reference](reference-ambient-occlusion.md)
306312
* [IES Importer reference](IES-Importer.md)
313+
* [Lens flares reference](shared/lens-flare/lens-flare-lens-flares-reference.md)
314+
* [Lens Flare (SRP) reference](shared/lens-flare/lens-flare-reference.md)
315+
* [Lens Flare (SRP) Data Asset reference](shared/lens-flare/lens-flare-asset.md)
316+
* [Screen Space Lens Flare override reference](shared/lens-flare/reference-screen-space-lens-flare.md)
307317
* [Volumetric lighting reference](reference-volumetric-lighting.md)
308318
* [Screen Space Global Illumination](reference-screen-space-global-illumination.md)
309319
* [Screen Space Lens Flare](shared/lens-flare/reference-screen-space-lens-flare.md)
@@ -394,6 +404,5 @@
394404
* [Rendering and post-processing reference](reference-rendering-post-processing.md)
395405
* [Dynamic Resolution component reference](reference-dynamic-resolution.md)
396406
* [High Dynamic Range (HDR) tonemapping reference](reference-hdr-tonemapping.md)
397-
* [Lens Flare (SRP) Data Asset reference](shared/lens-flare/lens-flare-asset.md)
398407
* [Custom Pass reference](custom-pass-reference.md)
399408
* [HDRP Glossary](Glossary.md)

Packages/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/Override-Screen-Space-Lens-Flare.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Screen Space Lens Flare
1+
# Add screen space lens flares
22

33
![](../../Images/shared/lens-flare/screenspacelensflares.png)
44

@@ -50,7 +50,7 @@ To enable screen space lens flares, follow these steps:
5050

5151
If lens flares don't appear, check the settings of the **Bloom** override in the default volume in **Edit** > **Project Settings** > **Graphics** > **HDRP Global Settings** > **Frame Settings (Default Values)** > **Default Volume Profile Asset** > **Bloom**.
5252

53-
For information about screen space lens flare properties, refer to [Screen Space Lens Flare reference](shared/lens-flare/reference-screen-space-lens-flare.md).
53+
For information about screen space lens flare properties, refer to [Screen Space Lens Flare reference](reference-screen-space-lens-flare.md).
5454

5555
[!include[](../../snippets/volume-override-api.md)]
5656

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Choose a lens flare type
2+
3+
You can add the following types of lens flares:
4+
5+
- [Lens flares](lens-flare-component.md) - use a **Lens Flare (SRP)** component to create lens flares for lights that have specific locations in your scene, for example the sun or bright bulbs.
6+
- [Screen space lens flares](Override-Screen-Space-Lens-Flare.md) - use a **Screen Space Lens Flare** override to create lens flares for emissive surfaces, bright spots, and onscreen lights.
7+
8+
You can use both types in the same scene.
9+
10+
Use the following table to help you choose a lens flare type:
11+
12+
| Feature | Lens Flare (SRP) component | Screen Space Lens Flare override |
13+
|-|-|-|
14+
| Typical uses | Lens flares from the sun and specific lights, custom flare shapes, and cinematics | Lens flares on vehicles and water, first-person games, and science-fiction environments |
15+
| Supported platforms | All platforms | All platforms |
16+
| CPU and GPU use | CPU and GPU | GPU |
17+
| Types of light | All Light objects, except Area Lights | All bright spots and visible lights |
18+
| Placement | Attach to individual lights. Place lens flares manually | Generate inside a volume. Place all lens flares automatically with a single setting |
19+
| Lens flares from offscreen lights | Yes | No |
20+
| Light streaks | No, unless you create them manually | Yes |
21+
| Configure flares | Configure per lens flare or per element | Configure for all lens flares together |
22+
| Configure flare elements | Configure many settings for each element, per lens flare | Configure several settings for elements, for all lens flares together |
23+
| Configure attenuation | Yes | No |
24+
| Affected by clouds, fog and water | Yes | Yes |
25+
| Preserve aspect ratio | Yes | No |
26+
| Chromatic aberration | No | Yes |
27+
| Blend modes | Additive, Lerp, Premultiplied and Screen | Additive only |
28+
| Occlusion | Screen space occlusion, and geometric occlusion for offscreen lights. Configurable. Occlusion might not always work at the edge of the screen. | Screen space occlusion, generated from the color buffer. Not configurable |
29+
| Examples in [package samples](../../HDRP-Sample-Content.md) | Yes | No |
30+
31+
## Additional resources
32+
33+
- [Lens Flare (SRP) reference](lens-flare-srp-reference.md)
34+
- [Lens Flare (SRP) Data Asset reference](lens-flare-asset.md)
35+
- [Screen Space Lens Flare override reference](reference-screen-space-lens-flare.md)

Packages/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-asset.md

Lines changed: 8 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Unity’s [Scriptable Render Pipeline (SRP)](https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html) includes the **Lens Flare Data** asset. You can use this asset to control the appearance of [Lens Flares](lens-flare-component.md) in your scene. This is the SRP equivalent of the Built-in Render Pipeline's [Flare](https://docs.unity3d.com/Manual/class-Flare.html) asset, which is incompatible with SRPs.
44

5-
To create a Lens Flare Data asset, select **Assets > Create > Lens Flare (SRP)**. To use this asset, assign it to the **Lens Flare Data** property of a [Lens Flare (SRP) component](lens-flare-component.md).
5+
To create a Lens Flare Data asset, select **Assets** > **Create** > **Lens Flare (SRP)**. To use this asset, assign it to the **Lens Flare Data** property of a [Lens Flare (SRP) component](lens-flare-component.md).
66

77
## Properties
88

@@ -24,20 +24,14 @@ The Lens Flare Element asset has the following properties:
2424
- [Curve](#Curve)
2525
- [Random](#Random)
2626

27-
<a name="Image"></a>
28-
2927
### Type
3028

3129
| **Property** | **Description** |
3230
| ------------ | ------------------------------------------------------------ |
3331
| Type | Select the type of Lens Flare Element this asset creates: <br />&#8226; [Image](#Image) <br />&#8226; [Circle](#Circle) <br />&#8226; [Polygon](#Polygon) |
3432

35-
<a name="Image"></a>
36-
3733
#### Image
3834

39-
![](../../images/shared/lens-flare/LensFlareShapeImage.png)
40-
4135
| **Property** | **Description** |
4236
| --------------------- | ------------------------------------------------------------ |
4337
| Flare Texture | The Texture this lens flare element uses. |
@@ -47,8 +41,6 @@ The Lens Flare Element asset has the following properties:
4741

4842
#### Circle
4943

50-
![](../../images/shared/lens-flare/LensFlareShapeCircle.png)
51-
5244
| **Property** | **Description** |
5345
| ------------ | ------------------------------------------------------------ |
5446
| Gradient | Controls the offset of the circular flare's gradient. This value ranges from 0 to 1. |
@@ -59,8 +51,6 @@ The Lens Flare Element asset has the following properties:
5951

6052
#### Polygon
6153

62-
![](../../images/shared/lens-flare/LensFlareShapePolygon.png)
63-
6454
| **Property** | **Description** |
6555
| ------------ | ------------------------------------------------------------ |
6656
| Gradient | Controls the offset of the polygon flare's gradient. This value ranges from 0 to 1. |
@@ -73,8 +63,6 @@ The Lens Flare Element asset has the following properties:
7363

7464
#### Ring
7565

76-
![](images/LensFlareShapeRing.png)
77-
7866
| **Property** | **Description** |
7967
| --------------- | -------------------------------------------------------------- |
8068
| Gradient | Controls the offset of the circular flare's gradient. This value ranges from 0 to 1. |
@@ -89,25 +77,22 @@ The Lens Flare Element asset has the following properties:
8977

9078
#### Lens Flare Data Driven SRP
9179

92-
![](images/LensFlareShapeLensFlareDataSRP.png)
93-
9480
| **Property** | **Description** |
9581
| --------------- | ------------------------------------------------------------ |
9682
| Asset | Lens Flare Data SRP asset as an element. |
9783

9884
Unity support an Lens Flare Data SRP recursive, but with a hard cutoff after 16 recursions call.
9985
For instance asset A constains asset B which constains asset A (infinite recursion).
10086
That will trigger a warning and execution 16 recursions:
101-
~~~~~~
87+
88+
```
10289
"LensFlareSRPAsset contains too deep recursive asset (> 16). Be careful to not have recursive aggregation, A contains B, B contains A, ... which will produce an infinite loop."
103-
~~~~~~
90+
```
10491

10592
<a name="Color"></a>
10693

10794
## Color
10895

109-
![](../../images/shared/lens-flare/LensFlareColor.png)
110-
11196
| **Property** | **Description** |
11297
| ----------------------- | ------------------------------------------------------------ |
11398
| Color Type | Select the color type of Lens Flare Element this asset creates: <br />&#8226; [Constant](#ColorConstant) <br />&#8226; [Radial](#ColorRadial) <br />&#8226; [Angular](#ColorAngular) |
@@ -120,8 +105,6 @@ That will trigger a warning and execution 16 recursions:
120105

121106
### Constant Color
122107

123-
![](../../images/shared/lens-flare/LensFlareColorConstant.png)
124-
125108
| **Property** | **Description** |
126109
| ----------------------- | ------------------------------------------------------------ |
127110
| Tint | Changes the tint of the lens flare. If this asset is attached to the light, this property is based on the light tint. |
@@ -130,8 +113,6 @@ That will trigger a warning and execution 16 recursions:
130113

131114
### Constant Color
132115

133-
![](../../images/shared/lens-flare/LensFlareColorRadialGradient.png)
134-
135116
| **Property** | **Description** |
136117
| ----------------------- | ------------------------------------------------------------ |
137118
| Tint Radial | Specifies the radial gradient tint of the element. If the element type is set to Image, the Flare Texture is multiplied by this color. |
@@ -140,8 +121,6 @@ That will trigger a warning and execution 16 recursions:
140121

141122
### Constant Color
142123

143-
![](../../images/shared/lens-flare/LensFlareColorAngularGradient.png)
144-
145124
| **Property** | **Description** |
146125
| ----------------------- | ------------------------------------------------------------ |
147126
| Tint Angular | Specifies the angular gradient tint of the element. If the element type is set to Image, the Flare Texture is multiplied by this color. |
@@ -154,25 +133,17 @@ That will trigger a warning and execution 16 recursions:
154133

155134
### Cutoff
156135

157-
![](../../images/shared/lens-flare/LensFlareCutoff.png)
158-
159-
| **Property** | **Description** |
160-
| ----------------------- | ------------------------------------------------------------ |
161-
| Cutoff Speed | Sets the speed at which the radius occludes the element.
162-
A value of zero (with a large radius) does not occlude anything. The higher this value, the faster the element is occluded on the side of the screen.
163-
The effect of this value is more noticeable with multiple elements.
164-
. |
165-
| Cutoff Radius | Sets the normalized radius of the lens shape used to occlude the lens flare element.
166-
A radius of one is equivalent to the scale of the element. |
136+
| **Property** | **Description** |
137+
|-|-|
138+
| Cutoff Speed | Sets the speed at which the radius occludes the element.<br/><br/>A value of zero (with a large radius) does not occlude anything. The higher this value, the faster the element is occluded on the side of the screen.<br/><br/>The effect of this value is more noticeable with multiple elements. |
139+
| Cutoff Radius | Sets the normalized radius of the lens shape used to occlude the lens flare element. A radius of one is equivalent to the scale of the element. |
167140

168141

169142

170143
<a name="Transform"></a>
171144

172145
### Transform
173146

174-
![](../../images/shared/lens-flare/LensFlareTransform.png)
175-
176147
| **Property** | **Description** |
177148
| ----------------------- | ------------------------------------------------------------ |
178149
| Position Offset | Defines the offset of the lens flare's position in screen space, relative to its source. |
@@ -186,8 +157,6 @@ A radius of one is equivalent to the scale of the element. |
186157

187158
### Axis Transform
188159

189-
![](../../images/shared/lens-flare/LensFlareAxisTransform.png)
190-
191160
| **Property** | **Description** |
192161
| ----------------- | ------------------------------------------------------------ |
193162
| Starting Position | Defines the starting position of the lens flare relative to its source. This value operates in screen space. |
@@ -198,8 +167,6 @@ A radius of one is equivalent to the scale of the element. |
198167

199168
### Distortion
200169

201-
![](../../images/shared/lens-flare/LensFlareRadialDistortion.png)
202-
203170
| **Property** | **Description** |
204171
| --------------- | ------------------------------------------------------------ |
205172
| Enable | Set this property to True to enable distortion. |
@@ -220,7 +187,6 @@ A radius of one is equivalent to the scale of the element. |
220187
| Relative To Center | If true the distortion is relative to center of the screen otherwise relative to lensFlare source screen position. |
221188

222189
#### Uniform
223-
![](../../images/shared/lens-flare/LensFlareMultileElementUniform.png)
224190

225191
| **Property** | **Description** |
226192
| --------------- | ------------------------------------------------------------ |
@@ -231,8 +197,6 @@ A radius of one is equivalent to the scale of the element. |
231197

232198
#### Curve
233199

234-
![](../../images/shared/lens-flare/LensFlareMultileElementCurve.png)
235-
236200
| **Property** | **Description** |
237201
| ---------------- | ------------------------------------------------------------ |
238202
| Colors | The range of colors that this asset applies to the lens flares. You can use the **Position Spacing** curve to determine how this range affects each lens flare. |
@@ -244,8 +208,6 @@ A radius of one is equivalent to the scale of the element. |
244208

245209
#### Random
246210

247-
![](../../images/shared/lens-flare/LensFlareMultileElementRandom.png)
248-
249211
| **Property** | **Description** |
250212
| ------------------- | ------------------------------------------------------------ |
251213
| Seed | The base value that this asset uses to generate randomness. |

0 commit comments

Comments
 (0)