Version: Unity 6.4 Beta (6000.4)
Language : English
Add a 2D custom render pass to the frame rendering loop in URP
Get started with 3D game development

2D injection points reference in URP

In a 2D project, URP contains multiple injection points that let you inject render passes into the 2D frame rendering loop and execute them upon different events.

Injection points give a custom render pass access to URP buffers. A render pass has read and write access to all buffers at each injection point.

Unity provides the following events in the RenderPassEvent2D API. You can use these events to inject your custom passes.

Injection point When URP executes the render pass Render to specific sorting layer
BeforeRendering Before any other passes in the pipeline for the current cameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary
. Unity hasn’t set up camera matrices and stereo rendering at this point. You can use this injection point to draw to custom input textures used later in the pipeline, for example Look-Up Table (LUT) textures.
No
BeforeRenderingNormals Before URP renders normal mapsA type of Bump Map texture that allows you to add surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry.
See in Glossary
in the Normal2D pass.
Yes
AfterRenderingNormals After URP renders normal maps. Yes
BeforeRenderingShadows Before URP renders shadows in the Shadow2D pass. Yes
AfterRenderingShadows After rendering shadows. Yes
BeforeRenderingLights Before URP renders lighting in the Light2D pass. Yes
AfterRenderingLights After URP renders lighting. Yes
BeforeRenderingSprites Before URP renders spritesA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary
in the Renderer2D pass.
Yes
AfterRenderingSprites After URP renders sprites. Yes
BeforeRenderingPostProcessing Before URP renders post-processingA process that improves product visuals by applying filters and effects before the image appears on screen. You can use post-processing effects to simulate physical camera and film properties, for example Bloom and Depth of Field. More info post processing, postprocessing, postprocess
See in Glossary
effects in the RenderPostProcessingEffects pass.
No
AfterRenderingPostProcessing After URP renders post-processing effects, but before the final blitA shorthand term for “bit block transfer”. A blit operation is the process of transferring blocks of data from one place in memory to another.
See in Glossary
, post-processing anti-aliasing effects, and color grading.
No
AfterRendering After all other passes. No

Note: If you render to activeColorTexture in the BeforeRenderingSprites or AfterRenderingSprites injection points, rendering affects all sorting layers behind and up to the specified sorting layer.

Additional resources

Add a 2D custom render pass to the frame rendering loop in URP
Get started with 3D game development