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
Copy file name to clipboardExpand all lines: com.unity.render-pipelines.high-definition/Documentation~/Ray-Tracing-Getting-Started.md
+31-30Lines changed: 31 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Getting started with ray tracing
2
2
3
-
The High Definition Render Pipeline (HDRP) includes preview ray tracing support from Unity 2019.3. Ray tracing allows you to access data that is not on screen. For example, you can use it to request position data, normal data, or lighting data, and then use this data to compute quantities that are hard to approximate using classic rasterization techniques.
3
+
The High Definition Render Pipeline (HDRP) includes preview ray tracing support from Unity 2019.3. Ray tracing allows you to access data that's not on screen. For example, you can use it to request position data, normal data, or lighting data, and then use this data to compute quantities that are hard to approximate using classic rasterization techniques.
4
4
5
5
This document covers:
6
6
@@ -12,7 +12,7 @@ This document covers:
12
12
13
13
## Hardware requirements
14
14
15
-
Full ray tracing hardware acceleration is available on following GPUs:
15
+
Full ray tracing hardware acceleration is available on the following GPUs:
16
16
- NVIDIA GeForce 20 series:
17
17
- RTX 2060
18
18
- RTX 2060 Super
@@ -55,9 +55,9 @@ NVIDIA also provides a ray tracing fallback for some previous generation graphic
55
55
56
56
If your computer has one of these graphics cards, it can run ray tracing in Unity.
57
57
58
-
Before you open Unity, make sure to update your NVIDIA drivers to the latest version, and also make sure your Windows version is at least 1809.
58
+
Before you open Unity, make sure to update your NVIDIA drivers to the latest version, and make sure your Windows version is at least 1809.
59
59
60
-
The boolean [SystemInfo.supportsRayTracing](https://docs.unity3d.com/ScriptReference/SystemInfo-supportsRayTracing.html)can be used to validate if the current system supports ray tracing. This function checks the operating system, GPU, graphics driver and API.
60
+
You can use the Boolean [`SystemInfo.supportsRayTracing`](https://docs.unity3d.com/ScriptReference/SystemInfo-supportsRayTracing.html) to check if the current system supports ray tracing. This function checks the operating system, GPU, graphics driver and API.
61
61
62
62
<aname="Integration"></a>
63
63
@@ -87,7 +87,7 @@ You can use the [Render Pipeline Wizard](Render-Pipeline-Wizard.md) to set up ra
87
87
88
88
To enable ray tracing for specific effects, enable the ray tracing features in the [HDRP Asset](#ManualSetup-EnableAssetFeatures).
89
89
90
-
Your HDRP Project now supports ray tracing. For information on how to set up ray tracing for your Scene, see [final setup](#final-setup).
90
+
For information on how to set up ray tracing for your Scene, see [final setup](#final-setup).
91
91
92
92
<aname="ManualSetup"></a>
93
93
@@ -107,7 +107,7 @@ To set up ray tracing manually, you need to:
107
107
108
108
HDRP enables DirextX12 by default. To enable DirectX 12 manually:
109
109
110
-
1. Open the Project Settings window (menu: **Edit > Project Settings**), then select the **Player** tab.
110
+
1. Open the Project Settings window (menu: **Edit** > **Project Settings**), then select the **Player** tab.
111
111
2. Select the **Other Settings** drop-down, and in the **Rendering** section, disable Auto Graphics API for Windows. This exposes the Graphics APIs for Windows section.
112
112
3. In the **Graphics APIs for Windows** section, click the plus (**+**) button and select **Direct3d12**.
113
113
4. Unity uses Direct3d11 by default. To make Unity use Direct3d12, move **Direct3d12 (Experimental)** to the top of the list.
@@ -121,9 +121,9 @@ The Unity Editor window should now include the <DX12> tag in the title bar
121
121
122
122
#### Disabling static batching
123
123
124
-
Next, you need to disable static batching, because HDRP does not support this feature with ray tracing in **Play Mode**. To do this:
124
+
Next, you need to disable static batching, because HDRP doesn't support this feature with ray tracing in **Play Mode**. To do this:
125
125
126
-
1. Open the Project Settings window (menu: **Edit > Project Settings**), then select the **Player** tab.
126
+
1. Open the Project Settings window (menu: **Edit** > **Project Settings**), then select the **Player** tab.
127
127
2. Select the **Other Settings** drop-down, then in the **Rendering** section, disable **Static Batching**.
128
128
129
129
<aname="ManualSetup-EnablingRayTracing"></a>
@@ -139,7 +139,7 @@ Now that Unity is running in DirectX 12, and you have disabled [static batching]
139
139
140
140
#### Ray tracing resources
141
141
142
-
To verify that HDRP has properly assigned ray tracing resources:
142
+
To verify that HDRP has assigned ray tracing resources:
143
143
144
144
1. Open the Project Settings window (menu: **Edit** > **Project Settings**), then select the **HDRP Default Settings** tab.
145
145
2. Find the **Render Pipeline Resources** field and make sure there is a Render Pipeline Resources Asset assigned to it.
@@ -148,7 +148,7 @@ To verify that HDRP has properly assigned ray tracing resources:
148
148
149
149
#### (Optional) Enable ray-traced effects in your HDRP Asset
150
150
151
-
HDRP uses ray tracing to replace certain rasterized effects. In order to use a ray tracing effect in your Project, you must first enable the rasterized version of the effect. The four effects that require you to modify your HDRP Asset are:
151
+
HDRP uses ray tracing to replace certain rasterized effects. To use a ray tracing effect in your Project, you must first enable the rasterized version of the effect. The four effects that require you to modify your HDRP Asset are:
152
152
153
153
***Screen Space Shadows**
154
154
***Screen Space Reflections**
@@ -167,7 +167,7 @@ Your HDRP Project now fully supports ray tracing. For information on how to set
167
167
168
168
### Final setup
169
169
170
-
Now that your HDRP Project supports ray tracing, there are a few steps you must complete in order to actually use it in your Scene.
170
+
Now that your HDRP Project supports ray tracing, there are steps you must complete to use it in your Scene.
171
171
172
172
1.[Frame Settings validation](#frame-settings)
173
173
2.[Build settings validation](#build-settings)
@@ -199,15 +199,15 @@ To build your Project to a Unity Player, ray tracing requires that the build use
199
199
200
200
#### Scene validation
201
201
202
-
To check whether it is possible to use ray tracing in a Scene, HDRP includes a menu option that validates each GameObject in the Scene. If you do not setup GameObjects correctly, this process throws warnings in the Console window. For the list of things this option checks for, see [Menu items](Menu-Items.md#other). To use it:
202
+
To check whether it's possible to use ray tracing in a Scene, HDRP includes a menu option that validates each GameObject in the Scene. If you don't setup GameObjects correctly, this process throws warnings in the Console window. For the list of things this option checks for, see [Menu items](Menu-Items.md#other). To use it:
203
203
1. Click **Edit** > **Render Pipeline** > **HD Render Pipeline** > **Check Scene Content for Ray Tracing**.
204
204
2. In the Console window (menu: **Window > General > Console**), check if there are any warnings.
205
205
206
206
<aname="RayTracingEffectsOverview"></a>
207
207
208
208
## Ray tracing effects overview
209
209
210
-
HDRP uses ray tracing to replace some of its screen space effects, shadowing techniques, and Mesh rendering techniques.
210
+
HDRP uses ray tracing to replace some of its screen space effects, shadowing techniques, and Mesh rendering techniques:
211
211
212
212
-[Ray-Traced Ambient Occlusion](Ray-Traced-Ambient-Occlusion.md) replaces [screen space ambient occlusion](Override-Ambient-Occlusion.md) with a more accurate, ray-traced, ambient occlusion technique that can use off screen data.
213
213
-[Ray-Traced Contact Shadows](Ray-Traced-Contact-Shadows.md) replaces [contact shadows](Override-Contact-Shadows.md) with a more accurate, ray-traced, contact shadow technique that can use off screen data.
@@ -227,12 +227,12 @@ When you enable ray tracing, HDRP automatically creates a ray tracing accelerati
227
227
228
228
As a result, ray tracing can change how some Meshes appear in your scene in the following ways:
229
229
230
-
- If your Mesh has a Material assigned that does not have the HDRenderPipeline tag, HDRP does not add it to the acceleration structure and does not apply any ray traced effects to the mesh as a result.
231
-
- If your Mesh has a Decal Material assigned, HDRP does not add it to the acceleration structure and the Mesh does not appear in your scene.
230
+
- If your Mesh has a Material assigned that doesn't have the HDRenderPipeline tag, HDRP doesn't add it to the acceleration structure and doesn't apply any ray traced effects to the mesh as a result.
231
+
- If your Mesh has a Decal Material assigned, HDRP doesn't add it to the acceleration structure and the Mesh doesn't appear in your scene.
232
232
- If a Mesh has a combination of Materials that are single and double-sided, HDRP flags all Materials you have assigned to this mesh as double-sided.
233
233
234
234
## Ray tracing light culling
235
-
Ray tracing requires HDRP to cull lights differently to how it culls lights for rasterization. With rasterization, only lights that affect the current frustum matter. Since ray tracing uses off-screen data for effects such as reflection, HDRP needs to take into account lights that affect off screen geometry. For this reason, HDRP defines a range around the camera where it gathers light. To control this range, use the [Light Cluster](Ray-Tracing-Light-Cluster.md) Volume override. It is important to set a range that accurately represents the environment scale. A higher range makes HDRP include lights further away, but it also increases the resource intensity of light culling for ray tracing.
235
+
Ray tracing requires HDRP to cull lights differently to how it culls lights for rasterization. With rasterization, only lights that affect the current frustum matter. Since ray tracing uses off-screen data for effects such as reflection, HDRP needs to consider lights that affect off screen geometry. For this reason, HDRP defines a range around the camera where it gathers light. To control this range, use the [Light Cluster](Ray-Tracing-Light-Cluster.md) Volume override. It's important to set a range that accurately represents the environment scale. A higher range makes HDRP include lights further away, but it also increases the resource intensity of light culling for ray tracing.
236
236
237
237
## Ray tracing mode
238
238
HDRP includes two ray tracing modes that define how it evaluates certain ray-traced effects. The modes are:
@@ -267,25 +267,26 @@ This section contains information on the limitations of HDRP's ray tracing imple
267
267
There is no support for ray tracing on platforms other than DX12 for now.
268
268
269
269
HDRP ray tracing in Unity has the following limitations:
270
-
- Does not support vertex animation.
271
-
- Does not support decals.
272
-
- Does not support the volumetric part of the [fog](Override-Fog.md).
273
-
- Does not support tessellation.
274
-
- Does not support per pixel displacement (parallax occlusion mapping, height map, depth offset).
275
-
- Does not support VFX and Terrain.
276
-
- Does not have accurate culling for shadows, you may experience missing shadows in the ray traced effects.
277
-
- Does not support MSAA.
278
-
- Does not support [Graphics.DrawMesh](https://docs.unity3d.com/ScriptReference/Graphics.DrawMesh.html).
279
-
- Ray tracing is not supported when rendering [Reflection Probes](Reflection-Probe.md).
280
-
- HDRP does not support [orthographic projection](HDRP-Camera.md). If you enable orthographic projection mode, you might experience rendering problems for Transparent Materials, volumetrics and planar reflections.
281
-
- Ray Traced and Screen Space effects will not appear recursively in [Ray Traced Reflections](Ray-Traced-Reflections.md), [Ray Traced Global Illumination](Ray-Traced-Global-Illumination.md) or [Recursive Ray Tracing](Ray-Tracing-Recursive-Rendering.md). This means, for example, you will not be able to see [Screen Space Global Illumination](Override-Screen-Space-GI.md) in [ray-traced reflection](Ray-Traced-Reflections.md).
270
+
271
+
- Doesn't support vertex animation.
272
+
- Doesn't support decals.
273
+
- Doesn't support the volumetric part of the [fog](Override-Fog.md).
274
+
- Doesn't support tessellation.
275
+
- Doesn't support per pixel displacement (parallax occlusion mapping, height map, depth offset).
276
+
- Doesn't support VFX and Terrain.
277
+
- Doesn't have accurate culling for shadows, you may experience missing shadows in the ray traced effects.
278
+
- Doesn't support MSAA.
279
+
- Doesn't support [Graphics.DrawMesh](https://docs.unity3d.com/ScriptReference/Graphics.DrawMesh.html).
280
+
- Ray tracing isn't supported when rendering [Reflection Probes](Reflection-Probe.md).
281
+
- HDRP doesn't support [orthographic projection](HDRP-Camera.md). If you enable orthographic projection mode, you might experience rendering problems for Transparent Materials, volumetrics and planar reflections.
282
+
- Ray Traced and Screen Space effects won't appear recursively in [Ray Traced Reflections](Ray-Traced-Reflections.md), [Ray Traced Global Illumination](Ray-Traced-Global-Illumination.md) or [Recursive Ray Tracing](Ray-Tracing-Recursive-Rendering.md). This means, for example, you won't be able to see [Screen Space Global Illumination](Override-Screen-Space-GI.md) in [ray-traced reflection](Ray-Traced-Reflections.md).
282
283
283
284
### Unsupported shader graph nodes for ray tracing
284
285
285
286
When building your custom shaders using shader graph, some nodes are incompatible with ray tracing. You need either to avoid using them or provide an alternative behavior using the ray tracing shader node. Here is the list of the incompatible nodes:
286
287
- DDX, DDY and DDXY nodes.
287
-
- All the nodes under Inputs > Geometry (Position, View Direction, Normal, etc.) in View Space mode.
288
-
Furthermore, Shader Graphs that use [Custom Interpolators](../../com.unity.shadergraph/Documentation~/Custom-Interpolators.md)are not supported in ray tracing.
288
+
- All the nodes under **Inputs** > **Geometry** (Position, View Direction, Normal, etc.) in View Space mode.
289
+
Furthermore, Shader Graphs that use [Custom Interpolators](../../com.unity.shadergraph/Documentation~/Custom-Interpolators.md)aren't supported in ray tracing.
0 commit comments