Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,6 @@ To check whether it is possible to use ray tracing in a Scene, HDRP includes a m
1. Click **Edit > Rendering > Check Scene Content for HDRP Ray Tracing**.
2. In the Console window (menu: **Window > General > Console**), check if there are any warnings.

<a name="RayTracingMeshes"></a>

# Ray tracing and Meshes

HDRP changes how it handles Meshes in your scene when you integrate a ray traced effect into your project.

When you enable ray tracing, HDRP automatically creates a ray tracing acceleration structure. This structure allows Unity to calculate ray tracing for Meshes in your scene efficiently in real time.

As a result, ray tracing can change how some Meshes appear in your scene in the following ways:

- 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.
- 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.
- 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.

<a name="RayTracingEffectsOverview"></a>

## Ray tracing effects overview
Expand All @@ -214,8 +200,24 @@ HDRP uses ray tracing to replace some of its screen space effects, shadowing tec
- [Recursive Ray Tracing](Ray-Tracing-Recursive-Rendering.md) replaces the rendering pipeline for Meshes. Meshes that use this feature cast refraction and reflection rays recursively.
- [Ray-Traced Subsurface Scattering](Ray-Traced-Subsurface-Scattering.md) replaces [subsurface scattering](Subsurface-Scattering.md) with a more accurate, ray-traced, subsurface scattering technique that can use off screen data.

## Ray tracing mode
<a name="RayTracingMeshes"></a>

## Ray tracing and Meshes

HDRP changes how it handles Meshes in your scene when you integrate a ray traced effect into your project.

When you enable ray tracing, HDRP automatically creates a ray tracing acceleration structure. This structure allows Unity to calculate ray tracing for Meshes in your scene efficiently in real time.

As a result, ray tracing can change how some Meshes appear in your scene in the following ways:

- 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.
- 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.
- 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.

## Ray tracing light culling
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.

## Ray tracing mode
HDRP includes two ray tracing modes that define how it evaluates certain ray-traced effects. The modes are:

* **Performance**: This mode targets real-time applications. If you select this mode, ray-traced effects include presets that you can change to balance performance with quality.
Expand Down