From 9dc9314bd4ece9ea6c5bbd5aa2bb09274751543a Mon Sep 17 00:00:00 2001 From: Lewis Jordan Date: Mon, 13 Sep 2021 11:56:28 +0100 Subject: [PATCH 1/9] Updated lens flare screenshots for URP --- .../Documentation~/Images/lighting/LensFlareShapeCircle.png | 4 ++-- .../Documentation~/Images/lighting/LensFlareShapePolygon.png | 4 ++-- .../Documentation~/Images/lighting/LensFlareTransform.png | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapeCircle.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapeCircle.png index 7ec56363448..691cc01c854 100644 --- a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapeCircle.png +++ b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapeCircle.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c9ce5e561ac42b3111771a49390468a0cca863a1f47178285e07e5ffae06be7 -size 4800 +oid sha256:b07ff1308cfd182e75fce0f7fda3ee223f842cf3690b7708f5f9f17e8e631aea +size 4454 diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapePolygon.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapePolygon.png index 8b7b91df035..9d8a4086684 100644 --- a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapePolygon.png +++ b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapePolygon.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e80f5f3df7c56974fa140c772784f39f40edc3ac3d7754f5d978e4dbfdf9bbb -size 7673 +oid sha256:5bda603c5dbe15d78b069c6b7da23f2d262876a53ab24aff8c16be295bade6d0 +size 6803 diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareTransform.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareTransform.png index 57eb60af46d..d341836779c 100644 --- a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareTransform.png +++ b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareTransform.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f5b6c8b789a706313a9f6604692a18dc0148a4e401b32207844ba6bd434ef231 -size 7252 +oid sha256:a7df658c8c7ce32d2ffe5b2169b3eba5a03535fa483a88074ff297a9826515a4 +size 6686 From ca8c11dbc318b597dda8ca2a10a7cb84dd5774b2 Mon Sep 17 00:00:00 2001 From: Lewis Jordan Date: Mon, 13 Sep 2021 13:06:55 +0100 Subject: [PATCH 2/9] Updated docs for lens flare asset --- .../Documentation~/lens-flare-data-driven-asset.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md b/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md index d769811fb39..e27becca390 100644 --- a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md +++ b/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md @@ -49,7 +49,7 @@ The Lens Flare Element asset has the following properties: | ------------ | ------------------------------------------------------------ | | Gradient | Controls the offset of the circular flare's gradient. This value ranges from 0 to 1. | | Falloff | Controls the falloff of the circular flare's gradient. This value ranges from 0 to 1, where 0 has no falloff between the tones and 1 creates a falloff that is spread evenly across the circle. | -| Inverse | Enable this property to reverse the direction of the gradient. | +| Invert | Enable this property to reverse the direction of the gradient. | @@ -63,7 +63,7 @@ The Lens Flare Element asset has the following properties: | Falloff | Controls the falloff of the polygon flare's gradient. This value ranges from 0 to 1, where 0 has no falloff between the tones and 1 creates a falloff that is spread evenly across the polygon. | | Side Count | Determines how many sides the polygon flare has. | | Roundness | Defines how smooth the edges of the polygon flare are. This value ranges from 0 to 1, where 0 is a sharp polygon and 1 is a circle. | -| Inverse | Enable this property to reverse the direction of the gradient | +| Invert | Enable this property to reverse the direction of the gradient | @@ -89,8 +89,8 @@ The Lens Flare Element asset has the following properties: | Position Offset | Defines the offset of the lens flare's position in screen space, relative to its source. | | Auto Rotate | Enable this property to automatically rotate the Lens Flare Texture relative to its angle on the screen. Unity uses the **Auto Rotate** angle to override the **Rotation** parameter.

To ensure the Lens Flare can rotate, assign a value greater than 0 to the [**Starting Position**](#AxisTransform) property. | | Rotation | Rotates the lens flare. This value operates in degrees of rotation. | -| Size | Use this to adjust the scale of this lens flare element.

This property is not available when the [Type](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Type) is set to [Image](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Image) and **Preserve Aspect Ratio** is enabled. | -| Scale | The size of this lens flare element in world space. | +| Scale | The per-axis scale to apply to this lens flare element.

This property is not available when the [Type](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Type) is set to [Image](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Image) and **Preserve Aspect Ratio** is enabled. | +| Uniform Scale | The axis-independent scale to apply to this lens flare element. | From f961d470853ca27f3738a81bb11fed8d0a7f716c Mon Sep 17 00:00:00 2001 From: Lewis Jordan Date: Mon, 13 Sep 2021 14:29:36 +0100 Subject: [PATCH 3/9] Updated toc with lens flare entries and changed image names --- ...ensFlareAxisTransform.png => lens-flare-axis-transform.png} | 0 .../lighting/{LensFlareColor.png => lens-flare-color.png} | 0 .../Images/lighting/{LensFlareComp.png => lens-flare-comp.png} | 0 .../lighting/{LensFlareHeader.png => lens-flare-header.png} | 0 ...eElementCurve.png => lens-flare-multiple-element-curve.png} | 0 ...lementRandom.png => lens-flare-multiple-element-random.png} | 0 ...mentUniform.png => lens-flare-multiple-element-uniform.png} | 0 ...reRadialDistortion.png => lens-flare-radial-distortion.png} | 0 .../{LensFlareShapeCircle.png => lens-flare-shape-circle.png} | 0 .../{LensFlareShapeImage.png => lens-flare-shape-image.png} | 0 ...{LensFlareShapePolygon.png => lens-flare-shape-polygon.png} | 0 .../{LensFlareTransform.png => lens-flare-transform.png} | 0 .../Documentation~/TableOfContents.md | 3 ++- 13 files changed, 2 insertions(+), 1 deletion(-) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareAxisTransform.png => lens-flare-axis-transform.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareColor.png => lens-flare-color.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareComp.png => lens-flare-comp.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareHeader.png => lens-flare-header.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareMultileElementCurve.png => lens-flare-multiple-element-curve.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareMultileElementRandom.png => lens-flare-multiple-element-random.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareMultileElementUniform.png => lens-flare-multiple-element-uniform.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareRadialDistortion.png => lens-flare-radial-distortion.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareShapeCircle.png => lens-flare-shape-circle.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareShapeImage.png => lens-flare-shape-image.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareShapePolygon.png => lens-flare-shape-polygon.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{LensFlareTransform.png => lens-flare-transform.png} (100%) diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareAxisTransform.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-axis-transform.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareAxisTransform.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-axis-transform.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareColor.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-color.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareColor.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-color.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareComp.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-comp.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareComp.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-comp.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareHeader.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-header.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareHeader.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-header.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareMultileElementCurve.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-curve.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareMultileElementCurve.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-curve.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareMultileElementRandom.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-random.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareMultileElementRandom.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-random.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareMultileElementUniform.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-uniform.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareMultileElementUniform.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-uniform.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareRadialDistortion.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-radial-distortion.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareRadialDistortion.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-radial-distortion.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapeCircle.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-circle.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapeCircle.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-circle.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapeImage.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-image.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapeImage.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-image.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapePolygon.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-polygon.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareShapePolygon.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-polygon.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareTransform.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-transform.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/LensFlareTransform.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-transform.png diff --git a/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md b/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md index c4d5eb3aa07..a44bb178ff3 100644 --- a/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md @@ -38,6 +38,7 @@ * [The Universal Additional Light Data component](universal-additional-light-data.md) * [Shadows in the Universal Render Pipeline](Shadows-in-URP.md) * [Reflection probes](lighting/reflection-probes.md) + * [Lens Flare asset](lens-flare-data-driven-asset.md) * [Cameras](cameras.md) * [The Universal Additional Camera Data component](universal-additional-camera-data.md) * [Render Type](camera-types-and-render-type.md) @@ -71,7 +72,7 @@ * [Tonemapping](post-processing-tonemapping.md) * [Vignette](post-processing-vignette.md) * [White Balance](Post-Processing-White-Balance.md) - * [Lens Flare Data Driven](lens-flare-data-driven-component.md) + * [Lens Flare](lens-flare-data-driven-component.md) * [Shaders and Materials](shaders-in-universalrp.md) * [Shading Models](shading-model.md) From 750294f144eb5e762364ecb23142a5dba124c1b7 Mon Sep 17 00:00:00 2001 From: Lewis Jordan Date: Mon, 13 Sep 2021 16:45:24 +0100 Subject: [PATCH 4/9] Updated the lens flare component and lens flare asset pages --- ...=> lens-flare-multiple-elements-curve.png} | 0 ...> lens-flare-multiple-elements-random.png} | 0 ... lens-flare-multiple-elements-uniform.png} | 0 .../lens-flare-data-driven-asset.md | 38 ++++++++++--------- .../lens-flare-data-driven-component.md | 24 +++++++++--- 5 files changed, 38 insertions(+), 24 deletions(-) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{lens-flare-multiple-element-curve.png => lens-flare-multiple-elements-curve.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{lens-flare-multiple-element-random.png => lens-flare-multiple-elements-random.png} (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/lighting/{lens-flare-multiple-element-uniform.png => lens-flare-multiple-elements-uniform.png} (100%) diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-curve.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-curve.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-curve.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-curve.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-random.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-random.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-random.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-random.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-uniform.png b/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-uniform.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-element-uniform.png rename to com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-uniform.png diff --git a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md b/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md index e27becca390..1e7b52fe223 100644 --- a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md +++ b/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md @@ -1,8 +1,10 @@ -[comment]: # (If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.high-definition and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-data-driven-asset.md) +[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-data-driven-asset.md" -# Lens Flare (SRP) Asset +# Lens Flare (SRP) Data Asset -Unity’s [Scriptable Render Pipeline (SRP)](https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html) includes the **Lens Flare Element** asset. You can use this asset to create lens flares in your scene and control their appearance.
To create a Lens Flare Element asset, navigate to **Assets > Create > SRP Lens Flare**. To use this asset, assign it to the **Lens Flare Data** property of an [SRP Lens Flare Override Component](srp-lens-flare-component.md). +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-data-driven-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. + +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-data-driven-component.md). ## Properties @@ -32,7 +34,7 @@ The Lens Flare Element asset has the following properties: #### Image -![](images/lighting/LensFlareShapeImage.png) +![](images/lighting/lens-flare-shape-image.png) | **Property** | **Description** | | --------------------- | ------------------------------------------------------------ | @@ -43,19 +45,19 @@ The Lens Flare Element asset has the following properties: #### Circle -![](images/lighting/LensFlareShapeCircle.png) +![](images/lighting/lens-flare-shape-circle.png) | **Property** | **Description** | | ------------ | ------------------------------------------------------------ | | Gradient | Controls the offset of the circular flare's gradient. This value ranges from 0 to 1. | | Falloff | Controls the falloff of the circular flare's gradient. This value ranges from 0 to 1, where 0 has no falloff between the tones and 1 creates a falloff that is spread evenly across the circle. | -| Invert | Enable this property to reverse the direction of the gradient. | +| Inverse | Enable this property to reverse the direction of the gradient. | #### Polygon -![](images/lighting/LensFlareShapePolygon.png) +![](images/lighting/lens-flare-shape-polygon.png) | **Property** | **Description** | | ------------ | ------------------------------------------------------------ | @@ -63,13 +65,13 @@ The Lens Flare Element asset has the following properties: | Falloff | Controls the falloff of the polygon flare's gradient. This value ranges from 0 to 1, where 0 has no falloff between the tones and 1 creates a falloff that is spread evenly across the polygon. | | Side Count | Determines how many sides the polygon flare has. | | Roundness | Defines how smooth the edges of the polygon flare are. This value ranges from 0 to 1, where 0 is a sharp polygon and 1 is a circle. | -| Invert | Enable this property to reverse the direction of the gradient | +| Inverse | Enable this property to reverse the direction of the gradient | ## Color -![](images/lighting/LensFlareColor.png) +![](images/lighting/lens-flare-Color.png) | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | @@ -82,22 +84,22 @@ The Lens Flare Element asset has the following properties: ## Transform -![](images/lighting/LensFlareTransform.png) +![](images/lighting/lens-flare-Transform.png) | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | | Position Offset | Defines the offset of the lens flare's position in screen space, relative to its source. | | Auto Rotate | Enable this property to automatically rotate the Lens Flare Texture relative to its angle on the screen. Unity uses the **Auto Rotate** angle to override the **Rotation** parameter.

To ensure the Lens Flare can rotate, assign a value greater than 0 to the [**Starting Position**](#AxisTransform) property. | | Rotation | Rotates the lens flare. This value operates in degrees of rotation. | -| Scale | The per-axis scale to apply to this lens flare element.

This property is not available when the [Type](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Type) is set to [Image](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Image) and **Preserve Aspect Ratio** is enabled. | -| Uniform Scale | The axis-independent scale to apply to this lens flare element. | +| Size | Use this to adjust the scale of this lens flare element.

This property is not available when the [Type](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Type) is set to [Image](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Image) and **Preserve Aspect Ratio** is enabled. | +| Scale | The size of this lens flare element in world space. | ## AxisTransform -![](images/lighting/LensFlareAxisTransform.png) +![](images/lighting/lens-flare-axis-transform.png) | **Property** | **Description** | | ----------------- | ------------------------------------------------------------ | @@ -109,7 +111,7 @@ The Lens Flare Element asset has the following properties: ## Distortion -![](images/lighting/LensFlareRadialDistortion.png) +![](images/lighting/lens-flare-radial-distortion.png) | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | @@ -131,7 +133,7 @@ The Lens Flare Element asset has the following properties: | Relative To Center | If true the distortion is relative to center of the screen otherwise relative to lensFlare source screen position. | ### Uniform -![](images/lighting/LensFlareMultileElementUniform.png) +![](images/lighting/lens-flare-multiple-elements-uniform.png) | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | @@ -142,20 +144,20 @@ The Lens Flare Element asset has the following properties: ### Curve -![](images/lighting/LensFlareMultileElementCurve.png) +![](images/lighting/lens-flare-multiple-elements-curve.png) | **Property** | **Description** | | ---------------- | ------------------------------------------------------------ | | 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. | | Position Variation | Adjust this curve to change the placement of the lens flare elements in the **Lens Spread**. | -| Rotation | The uniform angle of rotation (in degrees) applied to each element distributed along the curve. This value ranges from -180° to 180 | +| Rotation | The uniform angle of rotation (in degrees) applied to each element distributed along the curve. This value ranges from -180° to 180°. | | Scale | Adjust this curve to control the size range of the lens flare elements. | ### Random -![](images/lighting/LensFlareMultileElementRandom.png) +![](images/lighting/lens-flare-multiple-elements-random.png) | **Property** | **Description** | | ------------------- | ------------------------------------------------------------ | diff --git a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-component.md b/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-component.md index 3bfdf249cb7..1c90505cade 100644 --- a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-component.md +++ b/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-component.md @@ -1,13 +1,25 @@ -[comment]: # (If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.high-definition and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-data-driven-component.md) +[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.high-definition and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-data-driven-component.md" -# Lens Flare (SRP) Component +# Lens Flare (SRP) component -![](images/lighting/LensFlareHeader.png) +![](images/lighting/lens-flare-header.png) -Unity’s Scriptable Render Pipeline (SRP) includes the SRP Lens Flare Override component to control a [Lens Flare (SRP) Data](lens-flare-data-driven-asset.md) asset. You can attach an Lens Flare (SRP) Component to any GameObject. -Some properties only appear when you attach this component to a light. +Unity’s Scriptable Render Pipeline (SRP) includes the Lens Flare (SRP) component which renders a lens flare in your scene. This is the SRP equivalent of the Built-in Render Pipeline's [Lens Flare](https://docs.unity3d.com/Manual/class-LensFlare.html) component, which is incompatible with SRPs. You can attach a Lens Flare (SRP) component to any GameObject, but some properties only appear when you attach a Lens Flare (SRP) component to a light. -![](images/lighting/LensFlareComp.png) +![](images/lighting/lens-flare-comp.png) + +## Using lens flares in SRP + +The Lens Flare (SRP) component controls where the lens flare is as well as properties such as attenuation and whether the lens flare considers occlusion. For properties that define how the lens flare looks, SRP uses the [Lens Flare (SRP) Data](lens-flare-data-driven-asset.md) asset. Each Lens Flare (SRP) component must reference a Lens Flare (SRP) data asset to display a lens flare on-screen. + +To create a lens flare in a scene: + +1. Create or select a GameObject to attach the lens flare too. +2. In the Inspector, click **Add Component**. +3. Select **Rendering** > **Lens Flare (SRP)**. Currently, the lens flare doesn't render in the scene because the component doesn't reference a Lens Flare (SRP) Data asset in its **Lens Flare Data** property. +4. Create a new Lens Flare (SRP) Data asset (menu: **Assets** > **Create** > **Lens Flare (SRP)**). +5. In the Lens Flare (SRP) component Inspector, assign the new Lens Flare (SRP) Data asset to the **Lens Flare Data** property. +6. Select the Lens Flare (SRP) Data asset and, in the Inspector, add a new element to the **Elements** list. A default white lens flare now renders at the position of the Lens Flare (SRP) component. For information on how to customize how the lens flare looks, see [Lens Flare (SRP) Data asset](lens-flare-data-driven-asset.md). ## Properties From 56b2457cd9bf938efc6c3307add6c47a09fd965c Mon Sep 17 00:00:00 2001 From: Lewis Jordan Date: Mon, 13 Sep 2021 16:51:26 +0100 Subject: [PATCH 5/9] Corrected links --- .../Documentation~/EffectList.md | 2 +- .../Documentation~/TableOfContents.md | 4 ++-- .../Documentation~/lens-flare-data-driven-asset.md | 6 +++--- .../Documentation~/lens-flare-data-driven-component.md | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/com.unity.render-pipelines.universal/Documentation~/EffectList.md b/com.unity.render-pipelines.universal/Documentation~/EffectList.md index b19faf3c396..8fba4e6f902 100644 --- a/com.unity.render-pipelines.universal/Documentation~/EffectList.md +++ b/com.unity.render-pipelines.universal/Documentation~/EffectList.md @@ -36,4 +36,4 @@ These are the post-processing effects that are available in the Universal Render * [White Balance](Post-Processing-White-Balance.md) -* [Lens Flare Data Driven](lens-flare-data-driven-component.md) +* [Lens Flare](lens-flare-component.md) diff --git a/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md b/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md index a44bb178ff3..1f5ffb56d34 100644 --- a/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md @@ -38,7 +38,7 @@ * [The Universal Additional Light Data component](universal-additional-light-data.md) * [Shadows in the Universal Render Pipeline](Shadows-in-URP.md) * [Reflection probes](lighting/reflection-probes.md) - * [Lens Flare asset](lens-flare-data-driven-asset.md) + * [Lens Flare asset](lens-flare-asset.md) * [Cameras](cameras.md) * [The Universal Additional Camera Data component](universal-additional-camera-data.md) * [Render Type](camera-types-and-render-type.md) @@ -72,7 +72,7 @@ * [Tonemapping](post-processing-tonemapping.md) * [Vignette](post-processing-vignette.md) * [White Balance](Post-Processing-White-Balance.md) - * [Lens Flare](lens-flare-data-driven-component.md) + * [Lens Flare](lens-flare-component.md) * [Shaders and Materials](shaders-in-universalrp.md) * [Shading Models](shading-model.md) diff --git a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md b/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md index 1e7b52fe223..2e692e332a0 100644 --- a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md +++ b/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md @@ -1,10 +1,10 @@ -[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-data-driven-asset.md" +[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-asset.md" # Lens Flare (SRP) Data Asset -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-data-driven-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. +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. -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-data-driven-component.md). +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). ## Properties diff --git a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-component.md b/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-component.md index 1c90505cade..96a335771a5 100644 --- a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-component.md +++ b/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-component.md @@ -1,4 +1,4 @@ -[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.high-definition and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-data-driven-component.md" +[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.high-definition and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-component.md" # Lens Flare (SRP) component @@ -8,9 +8,9 @@ Unity’s Scriptable Render Pipeline (SRP) includes the Lens Flare (SRP) compone ![](images/lighting/lens-flare-comp.png) -## Using lens flares in SRP +## Creating lens flares in SRP -The Lens Flare (SRP) component controls where the lens flare is as well as properties such as attenuation and whether the lens flare considers occlusion. For properties that define how the lens flare looks, SRP uses the [Lens Flare (SRP) Data](lens-flare-data-driven-asset.md) asset. Each Lens Flare (SRP) component must reference a Lens Flare (SRP) data asset to display a lens flare on-screen. +The Lens Flare (SRP) component controls where the lens flare is as well as properties such as attenuation and whether the lens flare considers occlusion. For properties that define how the lens flare looks, SRP uses the [Lens Flare (SRP) Data](lens-flare-asset.md) asset. Each Lens Flare (SRP) component must reference a Lens Flare (SRP) data asset to display a lens flare on-screen. To create a lens flare in a scene: @@ -19,7 +19,7 @@ To create a lens flare in a scene: 3. Select **Rendering** > **Lens Flare (SRP)**. Currently, the lens flare doesn't render in the scene because the component doesn't reference a Lens Flare (SRP) Data asset in its **Lens Flare Data** property. 4. Create a new Lens Flare (SRP) Data asset (menu: **Assets** > **Create** > **Lens Flare (SRP)**). 5. In the Lens Flare (SRP) component Inspector, assign the new Lens Flare (SRP) Data asset to the **Lens Flare Data** property. -6. Select the Lens Flare (SRP) Data asset and, in the Inspector, add a new element to the **Elements** list. A default white lens flare now renders at the position of the Lens Flare (SRP) component. For information on how to customize how the lens flare looks, see [Lens Flare (SRP) Data asset](lens-flare-data-driven-asset.md). +6. Select the Lens Flare (SRP) Data asset and, in the Inspector, add a new element to the **Elements** list. A default white lens flare now renders at the position of the Lens Flare (SRP) component. For information on how to customize how the lens flare looks, see [Lens Flare (SRP) Data](lens-flare-asset.md). ## Properties @@ -27,7 +27,7 @@ To create a lens flare in a scene: | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | -| Lens Flare Data | Select the [Lens Flare (SRP) Asset](lens-flare-data-driven-asset.md) asset this component controls. | +| 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. | | 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.
For example, if this component is attached to a spot light and the camera is looking at this light from behind, the lens flare will not be visible.
This property is only available when this component is attached to a light. | From 78dcbbc533b25270f728aa93eaa2eae6ce5ca4f0 Mon Sep 17 00:00:00 2001 From: Lewis Jordan Date: Mon, 13 Sep 2021 16:59:19 +0100 Subject: [PATCH 6/9] Updated HDRP version of the lens flare docs --- .../Documentation~/HDRP-Features.md | 2 +- .../Images/LensFlareShapeCircle.png | 3 -- .../Images/LensFlareShapePolygon.png | 3 -- .../Images/LensFlareTransform.png | 3 -- ...form.png => lens-flare-axis-transform.png} | 0 ...ensFlareColor.png => lens-flare-color.png} | 0 ...{LensFlareComp.png => lens-flare-comp.png} | 0 ...sFlareHeader.png => lens-flare-header.png} | 0 ...=> lens-flare-multiple-elements-curve.png} | 0 ...> lens-flare-multiple-elements-random.png} | 0 ... lens-flare-multiple-elements-uniform.png} | 0 ...n.png => lens-flare-radial-distortion.png} | 0 .../Images/lens-flare-shape-circle.png | 3 ++ ...peImage.png => lens-flare-shape-image.png} | 0 .../Images/lens-flare-shape-polygon.png | 3 ++ .../Images/lens-flare-transform.png | 3 ++ ...ta-driven-asset.md => lens-flare-asset.md} | 29 ++++++++++--------- ...n-component.md => lens-flare-component.md} | 26 ++++++++++++----- .../Documentation~/whats-new-12.md | 2 +- ...ta-driven-asset.md => lens-flare-asset.md} | 0 ...n-component.md => lens-flare-component.md} | 0 21 files changed, 46 insertions(+), 31 deletions(-) delete mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareShapeCircle.png delete mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareShapePolygon.png delete mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareTransform.png rename com.unity.render-pipelines.high-definition/Documentation~/Images/{LensFlareAxisTransform.png => lens-flare-axis-transform.png} (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{LensFlareColor.png => lens-flare-color.png} (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{LensFlareComp.png => lens-flare-comp.png} (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{LensFlareHeader.png => lens-flare-header.png} (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{LensFlareMultileElementCurve.png => lens-flare-multiple-elements-curve.png} (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{LensFlareMultileElementRandom.png => lens-flare-multiple-elements-random.png} (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{LensFlareMultileElementUniform.png => lens-flare-multiple-elements-uniform.png} (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{LensFlareRadialDistortion.png => lens-flare-radial-distortion.png} (100%) create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-circle.png rename com.unity.render-pipelines.high-definition/Documentation~/Images/{LensFlareShapeImage.png => lens-flare-shape-image.png} (100%) create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-polygon.png create mode 100644 com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-transform.png rename com.unity.render-pipelines.high-definition/Documentation~/{lens-flare-data-driven-asset.md => lens-flare-asset.md} (89%) rename com.unity.render-pipelines.high-definition/Documentation~/{lens-flare-data-driven-component.md => lens-flare-component.md} (54%) rename com.unity.render-pipelines.universal/Documentation~/{lens-flare-data-driven-asset.md => lens-flare-asset.md} (100%) rename com.unity.render-pipelines.universal/Documentation~/{lens-flare-data-driven-component.md => lens-flare-component.md} (100%) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md index ce5745e9da6..e907663d87b 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md @@ -172,7 +172,7 @@ HDRP supports the Illuminating Engineering Society's (IES) file format for descr ![](Images/LensFlareSamples2.png) From HDRP 12.0, HDRP (and URP) introduces a new Lens Flare system. You can attach a Lens Flare (SRP) component to any GameObject. -Some Lens Flare properties only appear when you attach this component to a light. Each Lens Flare can have multiple elements that you can control individually. HDRP also provides a [new asset](lens-flare-data-driven-asset.md) and a [new component](lens-flare-data-driven-component.md) which you can attach to any GameObject. +Some Lens Flare properties only appear when you attach this component to a light. Each Lens Flare can have multiple elements that you can control individually. HDRP also provides a [new asset](lens-flare-asset.md) and a [new component](lens-flare-component.md) which you can attach to any GameObject. ### Reflection probes diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareShapeCircle.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareShapeCircle.png deleted file mode 100644 index 7ec56363448..00000000000 --- a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareShapeCircle.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c9ce5e561ac42b3111771a49390468a0cca863a1f47178285e07e5ffae06be7 -size 4800 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareShapePolygon.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareShapePolygon.png deleted file mode 100644 index 8b7b91df035..00000000000 --- a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareShapePolygon.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1e80f5f3df7c56974fa140c772784f39f40edc3ac3d7754f5d978e4dbfdf9bbb -size 7673 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareTransform.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareTransform.png deleted file mode 100644 index 57eb60af46d..00000000000 --- a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareTransform.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f5b6c8b789a706313a9f6604692a18dc0148a4e401b32207844ba6bd434ef231 -size 7252 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareAxisTransform.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-axis-transform.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareAxisTransform.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-axis-transform.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareColor.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-color.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareColor.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-color.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareComp.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-comp.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareComp.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-comp.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareHeader.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-header.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareHeader.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-header.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareMultileElementCurve.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-curve.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareMultileElementCurve.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-curve.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareMultileElementRandom.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-random.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareMultileElementRandom.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-random.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareMultileElementUniform.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-uniform.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareMultileElementUniform.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-uniform.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareRadialDistortion.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-radial-distortion.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareRadialDistortion.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-radial-distortion.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-circle.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-circle.png new file mode 100644 index 00000000000..691cc01c854 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-circle.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b07ff1308cfd182e75fce0f7fda3ee223f842cf3690b7708f5f9f17e8e631aea +size 4454 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareShapeImage.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-image.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/LensFlareShapeImage.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-image.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-polygon.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-polygon.png new file mode 100644 index 00000000000..9d8a4086684 --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-polygon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5bda603c5dbe15d78b069c6b7da23f2d262876a53ab24aff8c16be295bade6d0 +size 6803 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-transform.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-transform.png new file mode 100644 index 00000000000..d341836779c --- /dev/null +++ b/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-transform.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7df658c8c7ce32d2ffe5b2169b3eba5a03535fa483a88074ff297a9826515a4 +size 6686 diff --git a/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-data-driven-asset.md b/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-asset.md similarity index 89% rename from com.unity.render-pipelines.high-definition/Documentation~/lens-flare-data-driven-asset.md rename to com.unity.render-pipelines.high-definition/Documentation~/lens-flare-asset.md index 7e2e3839887..7a126eae848 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-data-driven-asset.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-asset.md @@ -1,8 +1,11 @@ -[comment]: # (If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-data-driven-asset.md) +[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-asset.md" -# Lens Flare (SRP) Asset -Unity’s [Scriptable Render Pipeline (SRP)](https://docs.unity3d.com/Manual/ScriptableRenderPipeline.html) includes the **Lens Flare Element** asset. You can use this asset to create lens flares in your scene and control their appearance.
To create a Lens Flare Element asset, navigate to **Assets > Create > SRP Lens Flare**. To use this asset, assign it to the **Lens Flare Data** property of an [SRP Lens Flare Override Component](srp-lens-flare-component.md). +# Lens Flare (SRP) Data Asset + +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. + +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). ## Properties @@ -32,7 +35,7 @@ The Lens Flare Element asset has the following properties: #### Image -![](images/LensFlareShapeImage.png) +![](Images/lens-flare-shape-image.png) | **Property** | **Description** | | --------------------- | ------------------------------------------------------------ | @@ -43,7 +46,7 @@ The Lens Flare Element asset has the following properties: #### Circle -![](images/LensFlareShapeCircle.png) +![](Images/lens-flare-shape-circle.png) | **Property** | **Description** | | ------------ | ------------------------------------------------------------ | @@ -55,7 +58,7 @@ The Lens Flare Element asset has the following properties: #### Polygon -![](images/LensFlareShapePolygon.png) +![](Images/lens-flare-shape-polygon.png) | **Property** | **Description** | | ------------ | ------------------------------------------------------------ | @@ -69,7 +72,7 @@ The Lens Flare Element asset has the following properties: ## Color -![](images/LensFlareColor.png) +![](Images/lens-flare-Color.png) | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | @@ -82,7 +85,7 @@ The Lens Flare Element asset has the following properties: ## Transform -![](images/LensFlareTransform.png) +![](Images/lens-flare-Transform.png) | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | @@ -97,7 +100,7 @@ The Lens Flare Element asset has the following properties: ## AxisTransform -![](images/LensFlareAxisTransform.png) +![](Images/lens-flare-axis-transform.png) | **Property** | **Description** | | ----------------- | ------------------------------------------------------------ | @@ -109,7 +112,7 @@ The Lens Flare Element asset has the following properties: ## Distortion -![](images/LensFlareRadialDistortion.png) +![](Images/lens-flare-radial-distortion.png) | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | @@ -131,7 +134,7 @@ The Lens Flare Element asset has the following properties: | Relative To Center | If true the distortion is relative to center of the screen otherwise relative to lensFlare source screen position. | ### Uniform -![](images/LensFlareMultileElementUniform.png) +![](Images/lens-flare-multiple-elements-uniform.png) | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | @@ -142,7 +145,7 @@ The Lens Flare Element asset has the following properties: ### Curve -![](images/LensFlareMultileElementCurve.png) +![](Images/lens-flare-multiple-elements-curve.png) | **Property** | **Description** | | ---------------- | ------------------------------------------------------------ | @@ -155,7 +158,7 @@ The Lens Flare Element asset has the following properties: ### Random -![](images/LensFlareMultileElementRandom.png) +![](Images/lens-flare-multiple-elements-random.png) | **Property** | **Description** | | ------------------- | ------------------------------------------------------------ | diff --git a/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-data-driven-component.md b/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-component.md similarity index 54% rename from com.unity.render-pipelines.high-definition/Documentation~/lens-flare-data-driven-component.md rename to com.unity.render-pipelines.high-definition/Documentation~/lens-flare-component.md index d9af11992e9..b709c5a9e81 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-data-driven-component.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-component.md @@ -1,13 +1,25 @@ -[comment]: # (If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-data-driven-component.md) +[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-component.md" -# Lens Flare (SRP) Component +# Lens Flare (SRP) component -![](images/LensFlareHeader.png) +![](Images/lens-flare-header.png) -Unity’s Scriptable Render Pipeline (SRP) includes the SRP Lens Flare Override component to control a [Lens Flare (SRP) Data](lens-flare-data-driven-asset.md) asset. You can attach an Lens Flare (SRP) Component to any GameObject. -Some properties only appear when you attach this component to a light. +Unity’s Scriptable Render Pipeline (SRP) includes the Lens Flare (SRP) component which renders a lens flare in your scene. This is the SRP equivalent of the Built-in Render Pipeline's [Lens Flare](https://docs.unity3d.com/Manual/class-LensFlare.html) component, which is incompatible with SRPs. You can attach a Lens Flare (SRP) component to any GameObject, but some properties only appear when you attach a Lens Flare (SRP) component to a light. -![](images/LensFlareComp.png) +![](Images/lens-flare-comp.png) + +## Creating lens flares in SRP + +The Lens Flare (SRP) component controls where the lens flare is as well as properties such as attenuation and whether the lens flare considers occlusion. For properties that define how the lens flare looks, SRP uses the [Lens Flare (SRP) Data](lens-flare-asset.md) asset. Each Lens Flare (SRP) component must reference a Lens Flare (SRP) data asset to display a lens flare on-screen. + +To create a lens flare in a scene: + +1. Create or select a GameObject to attach the lens flare too. +2. In the Inspector, click **Add Component**. +3. Select **Rendering** > **Lens Flare (SRP)**. Currently, the lens flare doesn't render in the scene because the component doesn't reference a Lens Flare (SRP) Data asset in its **Lens Flare Data** property. +4. Create a new Lens Flare (SRP) Data asset (menu: **Assets** > **Create** > **Lens Flare (SRP)**). +5. In the Lens Flare (SRP) component Inspector, assign the new Lens Flare (SRP) Data asset to the **Lens Flare Data** property. +6. Select the Lens Flare (SRP) Data asset and, in the Inspector, add a new element to the **Elements** list. A default white lens flare now renders at the position of the Lens Flare (SRP) component. For information on how to customize how the lens flare looks, see [Lens Flare (SRP) Data](lens-flare-asset.md). ## Properties @@ -15,7 +27,7 @@ Some properties only appear when you attach this component to a light. | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | -| Lens Flare Data | Select the [Lens Flare (SRP) Asset](lens-flare-data-driven-asset.md) asset this component controls. | +| 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. | | 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.
For example, if this component is attached to a spot light and the camera is looking at this light from behind, the lens flare will not be visible.
This property is only available when this component is attached to a light. | diff --git a/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md b/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md index e425ad1906d..9c35465782c 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md @@ -39,7 +39,7 @@ For detailed steps on how to create custom clouds in your scene, see [creating c HDRP 12.0 includes a new Lens Flare system. You can attach a Lens Flare (SRP) component to any GameObject. -Some Lens Flare properties only appear when you attach a Lens Flare (SRP) component to a light. Each Lens Flare has optional multiple elements that you can control individually. HDRP also provides a [new lens flare asset](lens-flare-data-driven-asset.md) and a [new lens flare component](lens-flare-data-driven-component.md) that you can attach to any GameObject. +Some Lens Flare properties only appear when you attach a Lens Flare (SRP) component to a light. Each Lens Flare has optional multiple elements that you can control individually. HDRP also provides a [new lens flare asset](lens-flare-asset.md) and a [new lens flare component](lens-flare-component.md) that you can attach to any GameObject. ### Light Anchor diff --git a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md b/com.unity.render-pipelines.universal/Documentation~/lens-flare-asset.md similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-asset.md rename to com.unity.render-pipelines.universal/Documentation~/lens-flare-asset.md diff --git a/com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-component.md b/com.unity.render-pipelines.universal/Documentation~/lens-flare-component.md similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/lens-flare-data-driven-component.md rename to com.unity.render-pipelines.universal/Documentation~/lens-flare-component.md From d570ad6da17daf6ab6a24c24bfec53057da913bc Mon Sep 17 00:00:00 2001 From: Lewis Jordan Date: Wed, 15 Sep 2021 11:53:14 +0100 Subject: [PATCH 7/9] Shifted format for URP and HDRP to use the shared folders --- .../lens-flare}/lens-flare-axis-transform.png | 0 .../lens-flare}/lens-flare-color.png | 0 .../lens-flare}/lens-flare-comp.png | 0 .../lens-flare}/lens-flare-header.png | 0 .../lens-flare-multiple-elements-curve.png | 0 .../lens-flare-multiple-elements-random.png | 0 .../lens-flare-multiple-elements-uniform.png | 0 .../lens-flare-radial-distortion.png | 0 .../lens-flare}/lens-flare-shape-circle.png | 0 .../lens-flare}/lens-flare-shape-image.png | 0 .../lens-flare}/lens-flare-shape-polygon.png | 0 .../lens-flare}/lens-flare-transform.png | 0 .../Documentation~/TableOfContents.md | 1 + .../shared/lens-flare}/lens-flare-asset.md | 22 ++- .../lens-flare}/lens-flare-component.md | 6 +- .../lens-flare}/lens-flare-axis-transform.png | 0 .../lens-flare}/lens-flare-color.png | 0 .../lens-flare}/lens-flare-comp.png | 0 .../lens-flare}/lens-flare-header.png | 0 .../lens-flare-multiple-elements-curve.png | 0 .../lens-flare-multiple-elements-random.png | 0 .../lens-flare-multiple-elements-uniform.png | 0 .../lens-flare-radial-distortion.png | 0 .../lens-flare}/lens-flare-shape-circle.png | 0 .../lens-flare}/lens-flare-shape-image.png | 0 .../lens-flare}/lens-flare-shape-polygon.png | 0 .../lens-flare}/lens-flare-transform.png | 0 .../Documentation~/TableOfContents.md | 4 +- .../shared/lens-flare/lens-flare-asset.md | 167 ++++++++++++++++++ .../shared/lens-flare/lens-flare-component.md | 46 +++++ 30 files changed, 228 insertions(+), 18 deletions(-) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-axis-transform.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-color.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-comp.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-header.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-multiple-elements-curve.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-multiple-elements-random.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-multiple-elements-uniform.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-radial-distortion.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-shape-circle.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-shape-image.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-shape-polygon.png (100%) rename com.unity.render-pipelines.high-definition/Documentation~/Images/{ => shared/lens-flare}/lens-flare-transform.png (100%) rename {com.unity.render-pipelines.universal/Documentation~ => com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare}/lens-flare-asset.md (93%) rename {com.unity.render-pipelines.universal/Documentation~ => com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare}/lens-flare-component.md (93%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-axis-transform.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-color.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-comp.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-header.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-multiple-elements-curve.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-multiple-elements-random.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-multiple-elements-uniform.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-radial-distortion.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-shape-circle.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-shape-image.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-shape-polygon.png (100%) rename com.unity.render-pipelines.universal/Documentation~/Images/{lighting => shared/lens-flare}/lens-flare-transform.png (100%) create mode 100644 com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-asset.md create mode 100644 com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-component.md diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-axis-transform.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-axis-transform.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-axis-transform.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-axis-transform.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-color.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-color.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-color.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-color.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-comp.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-comp.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-comp.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-comp.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-header.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-header.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-header.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-header.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-curve.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-curve.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-curve.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-curve.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-random.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-random.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-random.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-random.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-uniform.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-uniform.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-multiple-elements-uniform.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-uniform.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-radial-distortion.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-radial-distortion.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-radial-distortion.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-radial-distortion.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-circle.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-shape-circle.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-circle.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-shape-circle.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-image.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-shape-image.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-image.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-shape-image.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-polygon.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-shape-polygon.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-shape-polygon.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-shape-polygon.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-transform.png b/com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-transform.png similarity index 100% rename from com.unity.render-pipelines.high-definition/Documentation~/Images/lens-flare-transform.png rename to com.unity.render-pipelines.high-definition/Documentation~/Images/shared/lens-flare/lens-flare-transform.png diff --git a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md index 84b1dc76be3..7c33c941e03 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md @@ -184,6 +184,7 @@ * [Debugging Ray-Traced Effects](Ray-Tracing-Debug.md) * Components * [Decal Projector](Decal-Projector.md) + * [Lens Flare](shared/lens-flare/lens-flare-component.md) * Tools * [Look Dev](Look-Dev.md) * [Compositor](Compositor-Main.md) diff --git a/com.unity.render-pipelines.universal/Documentation~/lens-flare-asset.md b/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-asset.md similarity index 93% rename from com.unity.render-pipelines.universal/Documentation~/lens-flare-asset.md rename to com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-asset.md index 2e692e332a0..4093b55190f 100644 --- a/com.unity.render-pipelines.universal/Documentation~/lens-flare-asset.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-asset.md @@ -1,5 +1,3 @@ -[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-asset.md" - # Lens Flare (SRP) Data Asset 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. @@ -34,7 +32,7 @@ The Lens Flare Element asset has the following properties: #### Image -![](images/lighting/lens-flare-shape-image.png) +![](../../images/shared/lens-flare/lens-flare-shape-image.png) | **Property** | **Description** | | --------------------- | ------------------------------------------------------------ | @@ -45,7 +43,7 @@ The Lens Flare Element asset has the following properties: #### Circle -![](images/lighting/lens-flare-shape-circle.png) +![](../../images/shared/lens-flare/lens-flare-shape-circle.png) | **Property** | **Description** | | ------------ | ------------------------------------------------------------ | @@ -57,7 +55,7 @@ The Lens Flare Element asset has the following properties: #### Polygon -![](images/lighting/lens-flare-shape-polygon.png) +![](../../images/shared/lens-flare/lens-flare-shape-polygon.png) | **Property** | **Description** | | ------------ | ------------------------------------------------------------ | @@ -71,7 +69,7 @@ The Lens Flare Element asset has the following properties: ## Color -![](images/lighting/lens-flare-Color.png) +![](../../images/shared/lens-flare/lens-flare-Color.png) | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | @@ -84,7 +82,7 @@ The Lens Flare Element asset has the following properties: ## Transform -![](images/lighting/lens-flare-Transform.png) +![](../../images/shared/lens-flare/lens-flare-Transform.png) | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | @@ -99,7 +97,7 @@ The Lens Flare Element asset has the following properties: ## AxisTransform -![](images/lighting/lens-flare-axis-transform.png) +![](../../images/shared/lens-flare/lens-flare-axis-transform.png) | **Property** | **Description** | | ----------------- | ------------------------------------------------------------ | @@ -111,7 +109,7 @@ The Lens Flare Element asset has the following properties: ## Distortion -![](images/lighting/lens-flare-radial-distortion.png) +![](../../images/shared/lens-flare/lens-flare-radial-distortion.png) | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | @@ -133,7 +131,7 @@ The Lens Flare Element asset has the following properties: | Relative To Center | If true the distortion is relative to center of the screen otherwise relative to lensFlare source screen position. | ### Uniform -![](images/lighting/lens-flare-multiple-elements-uniform.png) +![](../../images/shared/lens-flare/lens-flare-multiple-elements-uniform.png) | **Property** | **Description** | | --------------- | ------------------------------------------------------------ | @@ -144,7 +142,7 @@ The Lens Flare Element asset has the following properties: ### Curve -![](images/lighting/lens-flare-multiple-elements-curve.png) +![](../../images/shared/lens-flare/lens-flare-multiple-elements-curve.png) | **Property** | **Description** | | ---------------- | ------------------------------------------------------------ | @@ -157,7 +155,7 @@ The Lens Flare Element asset has the following properties: ### Random -![](images/lighting/lens-flare-multiple-elements-random.png) +![](../../images/shared/lens-flare/lens-flare-multiple-elements-random.png) | **Property** | **Description** | | ------------------- | ------------------------------------------------------------ | diff --git a/com.unity.render-pipelines.universal/Documentation~/lens-flare-component.md b/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-component.md similarity index 93% rename from com.unity.render-pipelines.universal/Documentation~/lens-flare-component.md rename to com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-component.md index 96a335771a5..4cd6ee9bdce 100644 --- a/com.unity.render-pipelines.universal/Documentation~/lens-flare-component.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-component.md @@ -1,12 +1,10 @@ -[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.high-definition and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-component.md" - # Lens Flare (SRP) component -![](images/lighting/lens-flare-header.png) +![](../../images/shared/lens-flare/lens-flare-header.png) Unity’s Scriptable Render Pipeline (SRP) includes the Lens Flare (SRP) component which renders a lens flare in your scene. This is the SRP equivalent of the Built-in Render Pipeline's [Lens Flare](https://docs.unity3d.com/Manual/class-LensFlare.html) component, which is incompatible with SRPs. You can attach a Lens Flare (SRP) component to any GameObject, but some properties only appear when you attach a Lens Flare (SRP) component to a light. -![](images/lighting/lens-flare-comp.png) +![](../../images/shared/lens-flare/lens-flare-comp.png) ## Creating lens flares in SRP diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-axis-transform.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-axis-transform.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-axis-transform.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-axis-transform.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-color.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-color.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-color.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-color.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-comp.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-comp.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-comp.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-comp.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-header.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-header.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-header.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-header.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-curve.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-curve.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-curve.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-curve.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-random.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-random.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-random.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-random.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-uniform.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-uniform.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-multiple-elements-uniform.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-multiple-elements-uniform.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-radial-distortion.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-radial-distortion.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-radial-distortion.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-radial-distortion.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-circle.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-shape-circle.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-circle.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-shape-circle.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-image.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-shape-image.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-image.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-shape-image.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-polygon.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-shape-polygon.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-shape-polygon.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-shape-polygon.png diff --git a/com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-transform.png b/com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-transform.png similarity index 100% rename from com.unity.render-pipelines.universal/Documentation~/Images/lighting/lens-flare-transform.png rename to com.unity.render-pipelines.universal/Documentation~/Images/shared/lens-flare/lens-flare-transform.png diff --git a/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md b/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md index 1f5ffb56d34..6e9a9041794 100644 --- a/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.universal/Documentation~/TableOfContents.md @@ -38,7 +38,7 @@ * [The Universal Additional Light Data component](universal-additional-light-data.md) * [Shadows in the Universal Render Pipeline](Shadows-in-URP.md) * [Reflection probes](lighting/reflection-probes.md) - * [Lens Flare asset](lens-flare-asset.md) + * [Lens Flare asset](shared/lens-flare/lens-flare-asset.md) * [Cameras](cameras.md) * [The Universal Additional Camera Data component](universal-additional-camera-data.md) * [Render Type](camera-types-and-render-type.md) @@ -72,7 +72,7 @@ * [Tonemapping](post-processing-tonemapping.md) * [Vignette](post-processing-vignette.md) * [White Balance](Post-Processing-White-Balance.md) - * [Lens Flare](lens-flare-component.md) + * [Lens Flare](shared/lens-flare/lens-flare-component.md) * [Shaders and Materials](shaders-in-universalrp.md) * [Shading Models](shading-model.md) diff --git a/com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-asset.md b/com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-asset.md new file mode 100644 index 00000000000..4093b55190f --- /dev/null +++ b/com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-asset.md @@ -0,0 +1,167 @@ +# Lens Flare (SRP) Data Asset + +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. + +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). + +## Properties + +The Lens Flare Element asset has the following properties: + +- [Type](#Type) + - [Image](#Image) + - [Circle](#Circle) + - [Polygon](#Polygon) +- [Common](#Common) +- [AxisTransform](#AxisTransform) +- [Distortion](#Distortion) +- [Multiple Elements](#Multiple-Elements) + - [Uniform](#Uniform) + - [Curve](#Curve) + - [Random](#Random) + + + +### Type + +| **Property** | **Description** | +| ------------ | ------------------------------------------------------------ | +| Type | Select the type of Lens Flare Element this asset creates:
• [Image](#Image)
• [Circle](#Circle)
• [Polygon](#Polygon) | + + + +#### Image + +![](../../images/shared/lens-flare/lens-flare-shape-image.png) + +| **Property** | **Description** | +| --------------------- | ------------------------------------------------------------ | +| Flare Texture | The Texture this lens flare element uses. | +| Preserve Aspect Ratio | Fixes the width and height (aspect ratio) of the **Flare Texture**. You can use [Distortion](#Distortion) to change this property. | + + + +#### Circle + +![](../../images/shared/lens-flare/lens-flare-shape-circle.png) + +| **Property** | **Description** | +| ------------ | ------------------------------------------------------------ | +| Gradient | Controls the offset of the circular flare's gradient. This value ranges from 0 to 1. | +| Falloff | Controls the falloff of the circular flare's gradient. This value ranges from 0 to 1, where 0 has no falloff between the tones and 1 creates a falloff that is spread evenly across the circle. | +| Inverse | Enable this property to reverse the direction of the gradient. | + + + +#### Polygon + +![](../../images/shared/lens-flare/lens-flare-shape-polygon.png) + +| **Property** | **Description** | +| ------------ | ------------------------------------------------------------ | +| Gradient | Controls the offset of the polygon flare's gradient. This value ranges from 0 to 1. | +| Falloff | Controls the falloff of the polygon flare's gradient. This value ranges from 0 to 1, where 0 has no falloff between the tones and 1 creates a falloff that is spread evenly across the polygon. | +| Side Count | Determines how many sides the polygon flare has. | +| Roundness | Defines how smooth the edges of the polygon flare are. This value ranges from 0 to 1, where 0 is a sharp polygon and 1 is a circle. | +| Inverse | Enable this property to reverse the direction of the gradient | + + + +## Color + +![](../../images/shared/lens-flare/lens-flare-Color.png) + +| **Property** | **Description** | +| ----------------------- | ------------------------------------------------------------ | +| Tint | Changes the tint of the lens flare. If this asset is attached to the light, this property is based on the light tint. | +| Modulate By Light Color | Allows light color to affect this Lens Flare Element. This only applies when the asset is used in a [SRP Lens Flare Override Component](srp-lens-flare-component.md) that is attached to a point, spot, or area light. | +| Intensity | Controls the intensity of this element. | +| Blend Mode | Select the blend mode of the Lens Flare Element this asset creates:
• Additive
• Screen
• Premultiplied
• Lerp | + + + +## Transform + +![](../../images/shared/lens-flare/lens-flare-Transform.png) + +| **Property** | **Description** | +| ----------------------- | ------------------------------------------------------------ | +| Position Offset | Defines the offset of the lens flare's position in screen space, relative to its source. | +| Auto Rotate | Enable this property to automatically rotate the Lens Flare Texture relative to its angle on the screen. Unity uses the **Auto Rotate** angle to override the **Rotation** parameter.

To ensure the Lens Flare can rotate, assign a value greater than 0 to the [**Starting Position**](#AxisTransform) property. | +| Rotation | Rotates the lens flare. This value operates in degrees of rotation. | +| Size | Use this to adjust the scale of this lens flare element.

This property is not available when the [Type](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Type) is set to [Image](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Image) and **Preserve Aspect Ratio** is enabled. | +| Scale | The size of this lens flare element in world space. | + + + + +## AxisTransform + +![](../../images/shared/lens-flare/lens-flare-axis-transform.png) + +| **Property** | **Description** | +| ----------------- | ------------------------------------------------------------ | +| Starting Position | Defines the starting position of the lens flare relative to its source. This value operates in screen space. | +| Angular Offset | Controls the angular offset of the lens flare, relative to its current position. This value operates in degrees of rotation. | +| Translation Scale | Limits the size of the lens flare offset. For example, values of (1, 0) create a horizontal lens flare, and (0, 1) create a vertical lens flare.

You can also use this property to control how quickly the lens flare appears to move. For example, values of (0.5, 0.5) make the lens flare element appear to move at half the speed. | + + + +## Distortion + +![](../../images/shared/lens-flare/lens-flare-radial-distortion.png) + +| **Property** | **Description** | +| --------------- | ------------------------------------------------------------ | +| Enable | Set this property to True to enable distortion. | +| Radial Edge Size | Controls the size of the distortion effect from the edge of the screen. | +| Radial Edge Curve | Blends the distortion effect along a curve from the center of the screen to the edges of the screen. | +| Relative To Center | Set this value to True to make distortion relative to the center of the screen. Otherwise, distortion is relative to the screen position of the lens flare. | + + + +## Multiple Elements + +| **Property** | **Description** | +| --------------- | ------------------------------------------------------------ | +| Enable | Enable this to allow multiple lens flare elements in your scene. | +| Count | Determines the number of identical lens flare elements Unity generates.
A value of **1** appears the same as a single lens flare element. | +| Distribution | Select the method that Unity uses to generate multiple lens flare elements:
•[Uniform](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Uniform)
•[Curve](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Curve)
•[Random](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Random) | +| Length Spread | Controls how spread out multiple lens flare elements appear. | +| Relative To Center | If true the distortion is relative to center of the screen otherwise relative to lensFlare source screen position. | + +### Uniform +![](../../images/shared/lens-flare/lens-flare-multiple-elements-uniform.png) + +| **Property** | **Description** | +| --------------- | ------------------------------------------------------------ | +| Colors | The range of colors that this asset applies to the lens flares. | +| Rotation | The angle of rotation (in degrees) applied to each element incrementally. | + + + +### Curve + +![](../../images/shared/lens-flare/lens-flare-multiple-elements-curve.png) + +| **Property** | **Description** | +| ---------------- | ------------------------------------------------------------ | +| 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. | +| Position Variation | Adjust this curve to change the placement of the lens flare elements in the **Lens Spread**. | +| Rotation | The uniform angle of rotation (in degrees) applied to each element distributed along the curve. This value ranges from -180° to 180°. | +| Scale | Adjust this curve to control the size range of the lens flare elements. | + + + +### Random + +![](../../images/shared/lens-flare/lens-flare-multiple-elements-random.png) + +| **Property** | **Description** | +| ------------------- | ------------------------------------------------------------ | +| Seed | The base value that this asset uses to generate randomness. | +| Intensity Variation | Controls the variation of brightness across the lens flare elements. A high value can make some elements might invisible. | +| Colors | The range of colors that this asset applies to the lens flares. This property is based on the **Seed** value. | +| Position Variation | Controls the position of the lens flares. The **X** value is spread along the same axis as **Length Spread**. A value of 0 means there is no change in the lens flare position. The **Y** value is spread along the vertical screen space axis based on the **Seed** value. | +| Rotation Variation | Controls the rotation variation of the lens flares, based on the **Seed** value. The **Rotation** and **Auto Rotate** parameters inherit from this property. | +| Scale Variation | Controls the scale of the lens flares based on the **Seed** value. | diff --git a/com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-component.md b/com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-component.md new file mode 100644 index 00000000000..4cd6ee9bdce --- /dev/null +++ b/com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-component.md @@ -0,0 +1,46 @@ +# Lens Flare (SRP) component + +![](../../images/shared/lens-flare/lens-flare-header.png) + +Unity’s Scriptable Render Pipeline (SRP) includes the Lens Flare (SRP) component which renders a lens flare in your scene. This is the SRP equivalent of the Built-in Render Pipeline's [Lens Flare](https://docs.unity3d.com/Manual/class-LensFlare.html) component, which is incompatible with SRPs. You can attach a Lens Flare (SRP) component to any GameObject, but some properties only appear when you attach a Lens Flare (SRP) component to a light. + +![](../../images/shared/lens-flare/lens-flare-comp.png) + +## Creating lens flares in SRP + +The Lens Flare (SRP) component controls where the lens flare is as well as properties such as attenuation and whether the lens flare considers occlusion. For properties that define how the lens flare looks, SRP uses the [Lens Flare (SRP) Data](lens-flare-asset.md) asset. Each Lens Flare (SRP) component must reference a Lens Flare (SRP) data asset to display a lens flare on-screen. + +To create a lens flare in a scene: + +1. Create or select a GameObject to attach the lens flare too. +2. In the Inspector, click **Add Component**. +3. Select **Rendering** > **Lens Flare (SRP)**. Currently, the lens flare doesn't render in the scene because the component doesn't reference a Lens Flare (SRP) Data asset in its **Lens Flare Data** property. +4. Create a new Lens Flare (SRP) Data asset (menu: **Assets** > **Create** > **Lens Flare (SRP)**). +5. In the Lens Flare (SRP) component Inspector, assign the new Lens Flare (SRP) Data asset to the **Lens Flare Data** property. +6. Select the Lens Flare (SRP) Data asset and, in the Inspector, add a new element to the **Elements** list. A default white lens flare now renders at the position of the Lens Flare (SRP) component. For information on how to customize how the lens flare looks, see [Lens Flare (SRP) Data](lens-flare-asset.md). + +## Properties + +### 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. | +| 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.
For example, if this component is attached to a spot light and the camera is looking at this light from behind, the lens flare will not be visible.
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.
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**.
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 | +| 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.
For example, if a lens flare is inside the light bulb, you can use this to sample occlusion outside the light bulb. | +| Allow Off Screen | Enable this property to allow lens flares outside the Camera's view to affect the current field of view. | From efd320b23757b54a7f72e1c42dc4c05ab973829d Mon Sep 17 00:00:00 2001 From: Lewis Jordan Date: Wed, 15 Sep 2021 12:02:32 +0100 Subject: [PATCH 8/9] Corrected links and removed old docs from HDRP --- .../Documentation~/HDRP-Features.md | 2 +- .../Documentation~/TableOfContents.md | 1 + .../Documentation~/lens-flare-asset.md | 170 ------------------ .../Documentation~/lens-flare-component.md | 48 ----- .../shared/lens-flare/lens-flare-asset.md | 2 +- .../Documentation~/whats-new-12.md | 2 +- .../shared/lens-flare/lens-flare-asset.md | 2 +- 7 files changed, 5 insertions(+), 222 deletions(-) delete mode 100644 com.unity.render-pipelines.high-definition/Documentation~/lens-flare-asset.md delete mode 100644 com.unity.render-pipelines.high-definition/Documentation~/lens-flare-component.md diff --git a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md index e907663d87b..8ec0b07d7cf 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/HDRP-Features.md @@ -172,7 +172,7 @@ HDRP supports the Illuminating Engineering Society's (IES) file format for descr ![](Images/LensFlareSamples2.png) From HDRP 12.0, HDRP (and URP) introduces a new Lens Flare system. You can attach a Lens Flare (SRP) component to any GameObject. -Some Lens Flare properties only appear when you attach this component to a light. Each Lens Flare can have multiple elements that you can control individually. HDRP also provides a [new asset](lens-flare-asset.md) and a [new component](lens-flare-component.md) which you can attach to any GameObject. +Some Lens Flare properties only appear when you attach this component to a light. Each Lens Flare can have multiple elements that you can control individually. HDRP also provides a [new asset](shared/lens-flare/lens-flare-asset.md) and a [new component](shared/lens-flare/lens-flare-component.md) which you can attach to any GameObject. ### Reflection probes diff --git a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md index 7c33c941e03..c6132a0f7bd 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/TableOfContents.md @@ -185,6 +185,7 @@ * Components * [Decal Projector](Decal-Projector.md) * [Lens Flare](shared/lens-flare/lens-flare-component.md) + * [Lens Flare asset](shared/lens-flare/lens-flare-asset.md) * Tools * [Look Dev](Look-Dev.md) * [Compositor](Compositor-Main.md) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-asset.md b/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-asset.md deleted file mode 100644 index 7a126eae848..00000000000 --- a/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-asset.md +++ /dev/null @@ -1,170 +0,0 @@ -[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-asset.md" - - -# Lens Flare (SRP) Data Asset - -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. - -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). - -## Properties - -The Lens Flare Element asset has the following properties: - -- [Type](#Type) - - [Image](#Image) - - [Circle](#Circle) - - [Polygon](#Polygon) -- [Common](#Common) -- [AxisTransform](#AxisTransform) -- [Distortion](#Distortion) -- [Multiple Elements](#Multiple-Elements) - - [Uniform](#Uniform) - - [Curve](#Curve) - - [Random](#Random) - - - -### Type - -| **Property** | **Description** | -| ------------ | ------------------------------------------------------------ | -| Type | Select the type of Lens Flare Element this asset creates:
• [Image](#Image)
• [Circle](#Circle)
• [Polygon](#Polygon) | - - - -#### Image - -![](Images/lens-flare-shape-image.png) - -| **Property** | **Description** | -| --------------------- | ------------------------------------------------------------ | -| Flare Texture | The Texture this lens flare element uses. | -| Preserve Aspect Ratio | Fixes the width and height (aspect ratio) of the **Flare Texture**. You can use [Distortion](#Distortion) to change this property. | - - - -#### Circle - -![](Images/lens-flare-shape-circle.png) - -| **Property** | **Description** | -| ------------ | ------------------------------------------------------------ | -| Gradient | Controls the offset of the circular flare's gradient. This value ranges from 0 to 1. | -| Falloff | Controls the falloff of the circular flare's gradient. This value ranges from 0 to 1, where 0 has no falloff between the tones and 1 creates a falloff that is spread evenly across the circle. | -| Inverse | Enable this property to reverse the direction of the gradient. | - - - -#### Polygon - -![](Images/lens-flare-shape-polygon.png) - -| **Property** | **Description** | -| ------------ | ------------------------------------------------------------ | -| Gradient | Controls the offset of the polygon flare's gradient. This value ranges from 0 to 1. | -| Falloff | Controls the falloff of the polygon flare's gradient. This value ranges from 0 to 1, where 0 has no falloff between the tones and 1 creates a falloff that is spread evenly across the polygon. | -| Side Count | Determines how many sides the polygon flare has. | -| Roundness | Defines how smooth the edges of the polygon flare are. This value ranges from 0 to 1, where 0 is a sharp polygon and 1 is a circle. | -| Inverse | Enable this property to reverse the direction of the gradient | - - - -## Color - -![](Images/lens-flare-Color.png) - -| **Property** | **Description** | -| ----------------------- | ------------------------------------------------------------ | -| Tint | Changes the tint of the lens flare. If this asset is attached to the light, this property is based on the light tint. | -| Modulate By Light Color | Allows light color to affect this Lens Flare Element. This only applies when the asset is used in a [SRP Lens Flare Override Component](srp-lens-flare-component.md) that is attached to a point, spot, or area light. | -| Intensity | Controls the intensity of this element. | -| Blend Mode | Select the blend mode of the Lens Flare Element this asset creates:
• Additive
• Screen
• Premultiplied
• Lerp | - - - -## Transform - -![](Images/lens-flare-Transform.png) - -| **Property** | **Description** | -| ----------------------- | ------------------------------------------------------------ | -| Position Offset | Defines the offset of the lens flare's position in screen space, relative to its source. | -| Auto Rotate | Enable this property to automatically rotate the Lens Flare Texture relative to its angle on the screen. Unity uses the **Auto Rotate** angle to override the **Rotation** parameter.

To ensure the Lens Flare can rotate, assign a value greater than 0 to the [**Starting Position**](#AxisTransform) property. | -| Rotation | Rotates the lens flare. This value operates in degrees of rotation. | -| Size | Use this to adjust the scale of this lens flare element.

This property is not available when the [Type](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Type) is set to [Image](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Image) and **Preserve Aspect Ratio** is enabled. | -| Scale | The size of this lens flare element in world space. | - - - - -## AxisTransform - -![](Images/lens-flare-axis-transform.png) - -| **Property** | **Description** | -| ----------------- | ------------------------------------------------------------ | -| Starting Position | Defines the starting position of the lens flare relative to its source. This value operates in screen space. | -| Angular Offset | Controls the angular offset of the lens flare, relative to its current position. This value operates in degrees of rotation. | -| Translation Scale | Limits the size of the lens flare offset. For example, values of (1, 0) create a horizontal lens flare, and (0, 1) create a vertical lens flare.

You can also use this property to control how quickly the lens flare appears to move. For example, values of (0.5, 0.5) make the lens flare element appear to move at half the speed. | - - - -## Distortion - -![](Images/lens-flare-radial-distortion.png) - -| **Property** | **Description** | -| --------------- | ------------------------------------------------------------ | -| Enable | Set this property to True to enable distortion. | -| Radial Edge Size | Controls the size of the distortion effect from the edge of the screen. | -| Radial Edge Curve | Blends the distortion effect along a curve from the center of the screen to the edges of the screen. | -| Relative To Center | Set this value to True to make distortion relative to the center of the screen. Otherwise, distortion is relative to the screen position of the lens flare. | - - - -## Multiple Elements - -| **Property** | **Description** | -| --------------- | ------------------------------------------------------------ | -| Enable | Enable this to allow multiple lens flare elements in your scene. | -| Count | Determines the number of identical lens flare elements Unity generates.
A value of **1** appears the same as a single lens flare element. | -| Distribution | Select the method that Unity uses to generate multiple lens flare elements:
•[Uniform](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Uniform)
•[Curve](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Curve)
•[Random](https://github.com/Unity-Technologies/Graphics/pull/3496/files?file-filters[]=.md#Random) | -| Length Spread | Controls how spread out multiple lens flare elements appear. | -| Relative To Center | If true the distortion is relative to center of the screen otherwise relative to lensFlare source screen position. | - -### Uniform -![](Images/lens-flare-multiple-elements-uniform.png) - -| **Property** | **Description** | -| --------------- | ------------------------------------------------------------ | -| Colors | The range of colors that this asset applies to the lens flares. | -| Rotation | The angle of rotation (in degrees) applied to each element incrementally. | - - - -### Curve - -![](Images/lens-flare-multiple-elements-curve.png) - -| **Property** | **Description** | -| ---------------- | ------------------------------------------------------------ | -| 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. | -| Position Variation | Adjust this curve to change the placement of the lens flare elements in the **Lens Spread**. | -| Rotation | The uniform angle of rotation (in degrees) applied to each element distributed along the curve. This value ranges from -180° to 180°. | -| Scale | Adjust this curve to control the size range of the lens flare elements. | - - - -### Random - -![](Images/lens-flare-multiple-elements-random.png) - -| **Property** | **Description** | -| ------------------- | ------------------------------------------------------------ | -| Seed | The base value that this asset uses to generate randomness. | -| Intensity Variation | Controls the variation of brightness across the lens flare elements. A high value can make some elements might invisible. | -| Colors | The range of colors that this asset applies to the lens flares. This property is based on the **Seed** value. | -| Position Variation | Controls the position of the lens flares. The **X** value is spread along the same axis as **Length Spread**. A value of 0 means there is no change in the lens flare position. The **Y** value is spread along the vertical screen space axis based on the **Seed** value. | -| Rotation Variation | Controls the rotation variation of the lens flares, based on the **Seed** value. The **Rotation** and **Auto Rotate** parameters inherit from this property. | -| Scale Variation | Controls the scale of the lens flares based on the **Seed** value. | diff --git a/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-component.md b/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-component.md deleted file mode 100644 index b709c5a9e81..00000000000 --- a/com.unity.render-pipelines.high-definition/Documentation~/lens-flare-component.md +++ /dev/null @@ -1,48 +0,0 @@ -[comment]: # "If you modify this file make sure you modify the copy/paste file: com.unity.render-pipelines.universal and com.unity.render-pipelines.core\Documentation~\Common\lens-flare-component.md" - -# Lens Flare (SRP) component - -![](Images/lens-flare-header.png) - -Unity’s Scriptable Render Pipeline (SRP) includes the Lens Flare (SRP) component which renders a lens flare in your scene. This is the SRP equivalent of the Built-in Render Pipeline's [Lens Flare](https://docs.unity3d.com/Manual/class-LensFlare.html) component, which is incompatible with SRPs. You can attach a Lens Flare (SRP) component to any GameObject, but some properties only appear when you attach a Lens Flare (SRP) component to a light. - -![](Images/lens-flare-comp.png) - -## Creating lens flares in SRP - -The Lens Flare (SRP) component controls where the lens flare is as well as properties such as attenuation and whether the lens flare considers occlusion. For properties that define how the lens flare looks, SRP uses the [Lens Flare (SRP) Data](lens-flare-asset.md) asset. Each Lens Flare (SRP) component must reference a Lens Flare (SRP) data asset to display a lens flare on-screen. - -To create a lens flare in a scene: - -1. Create or select a GameObject to attach the lens flare too. -2. In the Inspector, click **Add Component**. -3. Select **Rendering** > **Lens Flare (SRP)**. Currently, the lens flare doesn't render in the scene because the component doesn't reference a Lens Flare (SRP) Data asset in its **Lens Flare Data** property. -4. Create a new Lens Flare (SRP) Data asset (menu: **Assets** > **Create** > **Lens Flare (SRP)**). -5. In the Lens Flare (SRP) component Inspector, assign the new Lens Flare (SRP) Data asset to the **Lens Flare Data** property. -6. Select the Lens Flare (SRP) Data asset and, in the Inspector, add a new element to the **Elements** list. A default white lens flare now renders at the position of the Lens Flare (SRP) component. For information on how to customize how the lens flare looks, see [Lens Flare (SRP) Data](lens-flare-asset.md). - -## Properties - -### 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. | -| 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.
For example, if this component is attached to a spot light and the camera is looking at this light from behind, the lens flare will not be visible.
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.
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**.
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 | -| 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.
For example, if a lens flare is inside the light bulb, you can use this to sample occlusion outside the light bulb. | -| Allow Off Screen | Enable this property to allow lens flares outside the Camera's view to affect the current field of view. | diff --git a/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-asset.md b/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-asset.md index 4093b55190f..ba90c3b44ff 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-asset.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-asset.md @@ -74,7 +74,7 @@ The Lens Flare Element asset has the following properties: | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | | Tint | Changes the tint of the lens flare. If this asset is attached to the light, this property is based on the light tint. | -| Modulate By Light Color | Allows light color to affect this Lens Flare Element. This only applies when the asset is used in a [SRP Lens Flare Override Component](srp-lens-flare-component.md) that is attached to a point, spot, or area light. | +| Modulate By Light Color | Allows light color to affect this Lens Flare Element. This only applies when the asset is used in a [Lens Flare (SRP) component](lens-flare-component.md) that is attached to a point, spot, or area light. | | Intensity | Controls the intensity of this element. | | Blend Mode | Select the blend mode of the Lens Flare Element this asset creates:
• Additive
• Screen
• Premultiplied
• Lerp | diff --git a/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md b/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md index 9c35465782c..78a8b9fa9bb 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/whats-new-12.md @@ -39,7 +39,7 @@ For detailed steps on how to create custom clouds in your scene, see [creating c HDRP 12.0 includes a new Lens Flare system. You can attach a Lens Flare (SRP) component to any GameObject. -Some Lens Flare properties only appear when you attach a Lens Flare (SRP) component to a light. Each Lens Flare has optional multiple elements that you can control individually. HDRP also provides a [new lens flare asset](lens-flare-asset.md) and a [new lens flare component](lens-flare-component.md) that you can attach to any GameObject. +Some Lens Flare properties only appear when you attach a Lens Flare (SRP) component to a light. Each Lens Flare has optional multiple elements that you can control individually. HDRP also provides a [new lens flare asset](shared/lens-flare/lens-flare-asset.md) and a [new lens flare component](shared/lens-flare/lens-flare-component.md) that you can attach to any GameObject. ### Light Anchor diff --git a/com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-asset.md b/com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-asset.md index 4093b55190f..ba90c3b44ff 100644 --- a/com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-asset.md +++ b/com.unity.render-pipelines.universal/Documentation~/shared/lens-flare/lens-flare-asset.md @@ -74,7 +74,7 @@ The Lens Flare Element asset has the following properties: | **Property** | **Description** | | ----------------------- | ------------------------------------------------------------ | | Tint | Changes the tint of the lens flare. If this asset is attached to the light, this property is based on the light tint. | -| Modulate By Light Color | Allows light color to affect this Lens Flare Element. This only applies when the asset is used in a [SRP Lens Flare Override Component](srp-lens-flare-component.md) that is attached to a point, spot, or area light. | +| Modulate By Light Color | Allows light color to affect this Lens Flare Element. This only applies when the asset is used in a [Lens Flare (SRP) component](lens-flare-component.md) that is attached to a point, spot, or area light. | | Intensity | Controls the intensity of this element. | | Blend Mode | Select the blend mode of the Lens Flare Element this asset creates:
• Additive
• Screen
• Premultiplied
• Lerp | From edea450c371e426ef810967556297cd15777988d Mon Sep 17 00:00:00 2001 From: sebastienlagarde Date: Thu, 16 Sep 2021 20:15:00 +0200 Subject: [PATCH 9/9] Update lens-flare-component.md --- .../Documentation~/shared/lens-flare/lens-flare-component.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-component.md b/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-component.md index 4cd6ee9bdce..56c03e1d0f2 100644 --- a/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-component.md +++ b/com.unity.render-pipelines.high-definition/Documentation~/shared/lens-flare/lens-flare-component.md @@ -12,7 +12,7 @@ The Lens Flare (SRP) component controls where the lens flare is as well as prope To create a lens flare in a scene: -1. Create or select a GameObject to attach the lens flare too. +1. Create or select a GameObject to attach the lens flare to. 2. In the Inspector, click **Add Component**. 3. Select **Rendering** > **Lens Flare (SRP)**. Currently, the lens flare doesn't render in the scene because the component doesn't reference a Lens Flare (SRP) Data asset in its **Lens Flare Data** property. 4. Create a new Lens Flare (SRP) Data asset (menu: **Assets** > **Create** > **Lens Flare (SRP)**).