-
Notifications
You must be signed in to change notification settings - Fork 820
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Backport] [2023.2] DOCG-3077 Add and update URP/HDRP lens flare pages
This is a backport of https://github.cds.internal.unity3d.com/unity/unity/pull/45691 - 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
- Loading branch information
1 parent
6e4bed2
commit fee8732
Showing
16 changed files
with
259 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...es.high-definition/Documentation~/shared/lens-flare/choose-a-lens-flare-type.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Choose a lens flare type | ||
|
||
You can add the following types of lens flares: | ||
|
||
- [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. | ||
- [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. | ||
|
||
You can use both types in the same scene. | ||
|
||
Use the following table to help you choose a lens flare type: | ||
|
||
| Feature | Lens Flare (SRP) component | Screen Space Lens Flare override | | ||
|-|-|-| | ||
| 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 | | ||
| Supported platforms | All platforms except XR | All platforms | | ||
| CPU and GPU use | CPU and GPU | GPU | | ||
| Types of light | All Light objects, except Area Lights | All bright spots and visible lights | | ||
| Placement | Attach to individual lights. Place lens flares manually | Generate inside a volume. Place all lens flares automatically with a single setting | | ||
| Lens flares from offscreen lights | Yes | No | | ||
| Light streaks | No, unless you create them manually | Yes | | ||
| Configure flares | Configure per lens flare or per element | Configure for all lens flares together | | ||
| Configure flare elements | Configure many settings for each element, per lens flare | Configure several settings for elements, for all lens flares together | | ||
| Configure attenuation | Yes | No | | ||
| Affected by clouds, fog and water | Volumetric clouds and background clouds only | Yes | | ||
| Preserve aspect ratio | Yes | No | | ||
| Chromatic aberration | No | Yes | | ||
| Blend modes | Additive, Lerp, Premultiplied and Screen | Additive only | | ||
| 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 | | ||
| Examples in [package samples](../../HDRP-Sample-Content.md) | Yes | No | | ||
|
||
## Additional resources | ||
|
||
- [Lens Flare (SRP) reference](lens-flare-srp-reference.md) | ||
- [Lens Flare (SRP) Data Asset reference](lens-flare-asset.md) | ||
- [Screen Space Lens Flare override reference](reference-screen-space-lens-flare.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
...elines.high-definition/Documentation~/shared/lens-flare/lens-flare-reference.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Lens flares references | ||
|
||
Property descriptions for lens flares. | ||
|
||
| Page| | ||
|-| | ||
| [Lens Flare (SRP) reference](lens-flare-srp-reference.md) | | ||
| [Lens Flare (SRP) Data Asset reference](lens-flare-asset.md) | | ||
| [Screen Space Lens Flare override reference](reference-screen-space-lens-flare.md) | |
31 changes: 31 additions & 0 deletions
31
...es.high-definition/Documentation~/shared/lens-flare/lens-flare-srp-reference.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Lens Flare (SRP) component reference | ||
|
||
Refer to [Add lens flares](lens-flare-component.md) for information on how to use the Lens Flare (SRP) component. | ||
|
||
## General | ||
|
||
| **Property** | **Description** | | ||
| --------------- | ------------------------------------------------------------ | | ||
| Lens Flare Data | Select the [Lens Flare (SRP) Data](lens-flare-asset.md) asset this component controls. | | ||
| Intensity | Multiplies the intensity of the lens flare. | | ||
| Scale | Multiplies the scale of the lens flare. | | ||
| Light Override | Specifies the light component Unity gets the color and shape values from, if you enable **Modulate By Light Color** or **Attenuation By Light Shape**. If you don't specify a light component, Unity uses the Light component from this GameObject. | | ||
| Attenuation by Light Shape | Enable this property to automatically change the appearance of the lens flare based on the type of light you attached this component to.<br/>For example, if this component is attached to a spot light and the camera is looking at this light from behind, the lens flare is not visible. <br/>This property is only available when this component is attached to a light. | | ||
| Attenuation Distance |The distance between the start and the end of the Attenuation Distance Curve.<br/>This value operates between 0 and 1 in world space. | | ||
| Attenuation Distance Curve | Fades out the appearance of the lens flare over the distance between the GameObject this asset is attached to, and the Camera. | | ||
| Scale Distance | The distance between the start and the end of the **Scale Distance Curve**.<br/>This value operates between 0 and 1 in world space. | | ||
| Scale Distance Curve | Changes the size of the lens flare over the distance between the GameObject this asset is attached to, and the Camera. | | ||
| Screen Attenuation Curve | Reduces the effect of the lens flare based on its distance from the edge of the screen. You can use this to display a lens flare at the edge of your screen | | ||
|
||
## Occlusion | ||
|
||
| **Property** | **Description** | | ||
| --------------- | ------------------------------------------------------------ | | ||
| Enable | Enable this property to partially obscure the lens flare based on the depth buffer | | ||
| Background Clouds | When enabled, the occlusion is attenuated by background clouds and volumetric clouds. | | ||
| Occlusion Radius | Defines how far from the light source Unity occludes the lens flare. This value is in world space. | | ||
| Sample Count | The number of random samples the CPU uses to generate the **Occlusion Radius.** | | ||
| Occlusion Offset | Offsets the plane that the occlusion operates on. A higher value moves this plane closer to Camera. This value is in world space. <br/>For example, if a lens flare is inside the light bulb, you can use this to sample occlusion outside the light bulb. | | ||
| Occlusion Remap Curve | Specifies the curve used to remap the occlusion of the flare. By default, the occlusion is linear, between 0 and 1. This can be useful to occlude flare more drastically when behind clouds. | | ||
| Allow Off Screen | Enable this property to allow lens flares outside the Camera's view to affect the current field of view. | | ||
|
12 changes: 12 additions & 0 deletions
12
...render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Lens flares | ||
|
||
Lens flares simulate the effect of lights refracting inside a camera lens. Use lens flares to represent bright lights, or to add atmosphere to a scene. | ||
|
||
|Page|Description| | ||
|-|-| | ||
| [Choose a lens flare type](choose-a-lens-flare-type.md) | Understand the differences between lens flares and screen space lens flares. | | ||
| [Add lens flares](lens-flare-component.md) | Use the Lens Flare (SRP) component to create lens flares for lights that have specific locations in your scene, for example bright bulbs. | | ||
| [Add screen space lens flares](Override-Screen-Space-Lens-Flare.md) | Use the Screen Space Lens Flare override to create lens flares for emissive surfaces, bright spots in your scene that appear depending on the camera view, and all onscreen lights. | | ||
| [Lens Flare (SRP) reference](lens-flare-srp-reference.md) | Reference for the Lens Flare (SRP) component. | | ||
| [Lens Flare (SRP) Data Asset reference](lens-flare-asset.md) | Reference for the Lens Flare (SRP) Data Asset. | | ||
| [Screen Space Lens Flare override reference](reference-screen-space-lens-flare.md) | Reference for the Screen Space Lens Flare override. | |
Oops, something went wrong.