Skip to content

Pre Pass

Vladislav Kantaev edited this page Mar 7, 2024 · 4 revisions

Motivation

Some post-processing effects require having separate full-screen texture with various geometry info. For example, SSAO needs depth and normals of the scene, while Temporal AA needs motion vectors.

Because Toon RP's rendering path is Forward and not Deferred, we can only produce them by doing running separate rendering loops over all visible geometry specifically drawing depth, normals, and/or motion vectors.

Depth Pre-Pass Normals Pre-Pass

Setup

In the pipeline asset's Camera Renderer section, find Pre-Pass Mode and set it the desired combination of modes.

📝 Note: Normals and Motion Vectors always require Depth, therefore it is not possible to exclude it.

Automatic Requirements

Some rendering extensions and post-processing passes may strictly require certain pre-pass modes. If your selected mode does not include the requirements, they will be added regardless and you will see a warning:

Warning

Depth Copy

Depth pre-pass is automatically optimized to a simple depth copy if all of the following conditions are met:

  • Effective Mode is Depth;
  • Earliest event when depth is required is AfterOpaque.