You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addresses the work and issues from [DOCG-991](https://jira.unity3d.com/browse/DOCG-991)
Restructures the ToC for the Camera Docs in URP
Updates pages to be closer to the standards of the Unity Style Guide
Aligns the Camera Docs with the Unity Docs content model
Adds additional pages to the Camera Docs section
The following PR will be added to this one before merging with trunk:
- #44235
Copy file name to clipboardExpand all lines: Packages/com.unity.render-pipelines.universal/Documentation~/anti-aliasing.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,4 +61,5 @@ To enable MSAA:
61
61
62
62
For more information on the available settings, refer to the [MSAA setings in the URP Asset](universalrp-asset.md#quality).
63
63
64
-
> **Note**: On mobile platforms that don't support the [StoreAndResolve](https://docs.unity3d.com/ScriptReference/Rendering.RenderBufferStoreAction.StoreAndResolve.html) store action, if **Opaque Texture** is selected in the **URP Asset**, Unity ignores the **MSAA** property at runtime (as if **MSAA** is set to **Disabled**).
64
+
> [!NOTE]
65
+
> On mobile platforms that don't support the [StoreAndResolve](https://docs.unity3d.com/ScriptReference/Rendering.RenderBufferStoreAction.StoreAndResolve.html) store action, if **Opaque Texture** is selected in the **URP Asset**, Unity ignores the **MSAA** property at runtime (as if **MSAA** is set to **Disabled**).
Copy file name to clipboardExpand all lines: Packages/com.unity.render-pipelines.universal/Documentation~/camera-stacking.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
# Camera Stacking
1
+
# Set up a camera stack
2
+
2
3
In the Universal Render Pipeline (URP), you use Camera Stacking to layer the output of multiple Cameras and create a single combined output. Camera Stacking allows you to create effects such as a 3D model in a 2D UI, or the cockpit of a vehicle.
3
4
4
5

@@ -10,6 +11,7 @@ A Camera Stack consists of a [Base Camera](camera-types-and-render-type.md#base-
10
11
For examples of how to use Camera Stacking, refer to the [Camera Stacking samples in URP Package Samples](package-sample-urp-package-samples.md#camera-stacking).
11
12
12
13
<aname="adding-a-camera-to-a-camera-stack"></a>
14
+
13
15
## Adding a Camera to a Camera Stack
14
16
15
17

@@ -23,7 +25,7 @@ The Overlay Camera is now part of the Base Camera's Camera Stack. Unity renders
23
25
24
26
You can add a Camera to a Camera Stack in a script by directly manipulating the `cameraStack` property of the Base Camera's [Universal Additional Camera Data](xref:UnityEngine.Rendering.Universal.UniversalAdditionalCameraData) component, like this:
@@ -40,7 +42,7 @@ The Overlay Camera remains in the scene, but is no longer part of the Camera Sta
40
42
41
43
You can remove a Camera from a Camera Stack in a script by directly manipulating the `cameraStack` property of the Base Camera's [Universal Additional Camera Data](xref:UnityEngine.Rendering.Universal.UniversalAdditionalCameraData) component, like this:
@@ -71,7 +73,7 @@ The Overlay Camera is now rendering in both Camera Stacks.
71
73
72
74
You can also add a Camera to a Camera Stack in a script by directly manipulating the `cameraStack` property of the Base Camera's [Universal Additional Camera Data](xref:UnityEngine.Rendering.Universal.UniversalAdditionalCameraData) component, like this:
Copy file name to clipboardExpand all lines: Packages/com.unity.render-pipelines.universal/Documentation~/camera-types-and-render-type.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Render Type
1
+
# Camera render types
2
2
3
3
There are two types of Camera in the Universal Render Pipeline (URP):
4
4
@@ -21,12 +21,14 @@ To change the type of a Camera in the Unity Editor:
21
21
22
22
You can change a Camera’s type in a script, by setting the `renderType` property of the Camera's [Universal Additional Camera Data](xref:UnityEngine.Rendering.Universal.UniversalAdditionalCameraData) component, like this:
Base Camera is the default type of Camera in URP. A Base Camera is a general purpose Camera that renders to a given render target.
32
34
@@ -46,7 +48,8 @@ An Overlay Camera is a Camera that renders its view on top of another Camera's o
46
48
47
49
You must use Overlay Cameras in conjunction with one or more Base Cameras using the [Camera Stacking](camera-stacking.md) system. You cannot use Overlay Cameras on their own. An Overlay Camera that is not part of a Camera Stack does not perform any steps of its render loop, and is known as an orphan Camera.
48
50
49
-
> **Note**: In this version of URP, Overlay Cameras and Camera Stacking are supported only when using the Universal Renderer.
51
+
> [!NOTE]
52
+
> In this version of URP, Overlay Cameras and Camera Stacking are supported only when using the Universal Renderer.
50
53
51
54
When you have an active Overlay Camera in your scene, this icon appears next to the Camera Gizmo in the Scene view:
Copy file name to clipboardExpand all lines: Packages/com.unity.render-pipelines.universal/Documentation~/cameras-advanced.md
+25-10Lines changed: 25 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,15 @@
1
-
# Clearing, rendering order and overdraw
1
+
# Understand camera render order
2
2
3
-
<aname="clearing"></a>
4
-
## Clearing
3
+
This page describes when a Universal Render Pipeline (URP) camera performs the following operations:
4
+
5
+
*[Clearing the color and depth buffers](#clearing)
6
+
*[Base Camera](#base-camera)
7
+
*[Overlay Camera](#overlay-camera)
8
+
*[Culling and rendering](#camera-culling-and-rendering-order)
9
+
*[Rendering order optimizations.](#rendering-order-optimizations)
10
+
*[Render requests](#render-requests)
11
+
12
+
## Clearing the color and depth buffers
5
13
6
14
In the Universal Render Pipeline (URP), Camera clearing behavior depends on the Camera's [Render Type](camera-types-and-render-type.md).
7
15
@@ -17,7 +25,7 @@ Note that the contents of the uninitialized color buffer vary by platform. On so
17
25
18
26
A Base Camera always clears its depth buffer at the start of each render loop.
19
27
20
-
## Overlay Camera
28
+
###Overlay Camera
21
29
22
30
#### Color buffer
23
31
@@ -29,9 +37,7 @@ At the start of its render loop, an Overlay Camera receives a depth buffer conta
29
37
30
38
When **Clear Depth** is set to true, the Overlay Camera clears the depth buffer and draws its view to the color buffer on top of any existing color data. When **Clear Depth** is set to false, the Overlay Camera tests against the depth buffer before drawing its view to the color buffer.
31
39
32
-
<aname="rendering-order"></a>
33
-
34
-
## Camera culling and rendering order
40
+
## Culling and rendering
35
41
36
42
If your URP scene contains multiple Cameras, Unity performs their culling and rendering operations in a predictable order.
37
43
@@ -56,13 +62,22 @@ Once per frame, Unity performs the following operations:
56
62
57
63
Unity can render an Overlay Camera’s view multiple times during a frame - either because the Overlay Camera appears in more than one Camera Stack, or because the Overlay Camera appears in the same Camera Stack more than once. When this happens, Unity does not reuse any element of the culling or rendering operation. The operations are repeated in full, in the order detailed above.
58
64
59
-
> **Note**: In this version of URP, Overlay Cameras and Camera Stacking are supported only when using the Universal Renderer. Overlay Cameras will not perform any part of their rendering loop if using the 2D Renderer.
65
+
> [!NOTE]
66
+
> In this version of URP, Overlay Cameras and Camera Stacking are supported only when using the Universal Renderer. Overlay Cameras will not perform any part of their rendering loop if using the 2D Renderer.
60
67
61
-
<aname="overdraw"></a>
62
-
## Overdraw
68
+
## Rendering order optimizations
63
69
64
70
URP performs several optimizations within a Camera, including rendering order optimizations to reduce overdraw. However, when you use a Camera Stack, you effectively define the order in which those Cameras are rendered. You must therefore be careful not to order the Cameras in a way that causes excessive overdraw.
65
71
66
72
When multiple Cameras in a Camera Stack render to the same render target, Unity draws each pixel in the render target for each Camera in the Camera Stack. Additionally, if more than one Base Camera or Camera Stack renders to the same area of the same render target, Unity draws any pixels in the overlapping area again, as many times as required by each Base Camera or Camera Stack.
67
73
68
74
You can use Unity's [Frame Debugger](https://docs.unity3d.com/Manual/FrameDebugger.html), or platform-specific frame capture and debugging tools, to understand where excessive overdraw occurs in your scene. You can then optimize your Camera Stacks accordingly.
75
+
76
+
## Render requests
77
+
78
+
You can use a render request in a C# script to trigger a camera to render to a render texture, outside the URP rendering loop. You can use two types of render request in URP, which do the following:
79
+
80
+
*[RenderPipeline.StandardRequest](xref:Rendering.RenderPipeline.StandardRequest) renders the output of a full stack of cameras.
81
+
*[UniversalRenderPipeline.SingleCameraRequest](https://docs.unity3d.com/Packages/[email protected]/api/UnityEngine.Rendering.Universal.UniversalRenderPipeline.SingleCameraRequest.html) renders the output of a single camera.
82
+
83
+
For more information on how to use render requests, refer to [Render Requests](https://docs.unity3d.com/Packages/[email protected]/manual/User-Render-Requests.html).
In the Universal Render Pipeline (URP), you can work with multiple Cameras to:
3
+
In the Universal Render Pipeline (URP), you can use multiple cameras to work with multiple camera outputs and targets, as well as different output resolutions and post-processing effects.
4
4
5
-
*[Stack Cameras](camera-stacking.md) to layer the outputs of multiple Cameras into a single combined output. Camera Stacking allows you to create effects such as 3D models in a 2D UI, or the cockpit of a vehicle.
6
-
*[Render multiple Base Cameras or Camera Stacks to the same render target](rendering-to-the-same-render-target.md). This allows you to create effects such as split screen rendering.
7
-
*[Render a Base Camera or Camera Stack to a Render Texture](rendering-to-a-render-texture.md). Rendering to a Render Texture allows you to create effects such as CCTV monitors.
5
+
> [!NOTE]
6
+
> If you use multiple cameras, it might make rendering slower. An active camera adds extra calls to the rendering loop even if it renders nothing.
8
7
9
-

8
+
<br/>*An example of the effect camera stacking can produce in URP.*
10
9
11
10
You can combine these ways of working for more complex effects. For example, you can define two Camera Stacks, and then set each of those to Camera Stacks that render to a different area of the same render target.
12
11
13
-
For information on Camera rendering order when working with multiple Cameras, refer to [Rendering order and overdraw](cameras-advanced.md).
12
+
For information on Camera rendering order when working with multiple Cameras, refer to [Understand camera render order](cameras-advanced.md).
13
+
14
+
| Page | Description |
15
+
|-|-|
16
+
|[Set up a camera stack](camera-stacking.md)| Stack cameras to layer the outputs of multiple cameras into a single combined output. Camera stacking allows you to create effects such as 3D models in a 2D UI, or the cockpit of a vehicle.|
17
+
|[Set up split-screen rendering](rendering-to-the-same-render-target.md)| Render multiple camera outputs to a single render target to create effects such as split screen rendering. |
18
+
|[Render a camera's output to a Render Texture](rendering-to-a-render-texture.md)| Render to a Render Texture to create effects such as in-game CCTV monitors. |
Copy file name to clipboardExpand all lines: Packages/com.unity.render-pipelines.universal/Documentation~/cameras.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
3
3
A Camera in Unity works like a camera in the real world: it captures a view of objects in 3-dimensional space and flattens that view to display it on a 2-dimensional surface.
4
4
5
-
Cameras in the Universal Render Pipeline (URP) are based on Unity's standard Camera functionality, but with some significant differences. The most notable ways in which Cameras in URP differ from standard Unity Cameras are:
6
-
7
-
* The [Universal Additional Camera Data](universal-additional-camera-data.md) component, which extends the Camera component's functionality and allows URP to store additional Camera-related data
8
-
* The [Render Type](camera-types-and-render-type.md)setting, which defines the two types of Camera in URP: Base and Overlay
9
-
* The [Camera Stacking](camera-stacking.md)system, which allows you to layer the output of multiple Cameras into a single combined output
10
-
* The [Volume](Volumes.md)system, which allows you to apply [post-processing effects](integration-with-post-processing.md) to a Camera based on a given Transform's position within your scene
11
-
* The [Camera component](camera-component-reference.md), which exposes URP-specific properties in the Inspector
12
-
13
-
For a general introduction to how Cameras work in Unity, and examples of common Camera workflows, refer to the [Unity Manual section on Cameras](https://docs.unity3d.com/Manual/CamerasOverview.html).
5
+
| Page | Description |
6
+
|-|-|
7
+
|[Cameras in URP](/cameras/camera-differences-in-urp.md)|Understand the differences between Unity's built-in camera and the URP camera.|
8
+
|[Understand camera render order](cameras-advanced.md)| Understand the order in which URP clears camera buffers and performs culling and rendering operations. |
9
+
|[Camera render types](camera-types-and-render-type.md)| Understand the difference between the Base and Overlay camera types. |
10
+
|[Anti-aliasing in URP](anti-aliasing.md)| Apply anti-aliasing effects to a camera. |
11
+
|[Use multiple cameras](cameras-multiple.md)| Set up and use more than one camera in a scene to use in a camera stack, a split screen effect, post-processing, or output to a render texture.|
12
+
|[Customize a camera](universal-additional-camera-data.md)| Use the Universal Additional Camera Data component to customise a camera's behavior.|
13
+
|[Camera component properties](camera-component-reference.md)| Understand how each camera property works in URP.|
0 commit comments