Table of Contents

How to use maps

Maps are textures that encode scene information, such as depth, normals, or object IDs.

They are commonly used in post-processing effects to achieve various visual styles. For example, we can use an object ID map in the outlines shader to create outlines around objects.

Using maps in the Built-in Render Pipeline.

  1. Add the maps you want to use to a GameObject in your scene.
  2. Configure the properties, most importantly
    • the camera that renders the scene (it will be cloned to render the map)
    • the render texture (this texture can used to drive effect properties)
    • whether to update the render list each frame. This can be expensive, so you may opt to call RefreshRenderList manually from your own script when needed.

Using maps in the Universal Render Pipeline (URP).

Map renderers are implemented as Renderer Features in URP.

  1. Add the maps you want to use to a Renderer by clicking the "Add Renderer Feature" button in the Renderer asset.
  2. Configure the properties, most importantly
    • the camera that renders the scene (it will be cloned to render the map)
    • the render texture (this texture can used to drive effect properties)
    • whether to update the render list each frame. This can be expensive, so you may opt to call RefreshRenderList manually from your own script when needed.