Article

About Tile Shading

Learn about combining rendering and compute operations into a single render pass while sharing local memory.

Overview

Many rendering techniques require a mixture of drawing and compute commands. Traditionally, rendering and compute commands were separated into distinct passes. These passes couldn’t communicate directly with each other; results from one pass were copied into device memory, only to be copied back into local memory by the next pass. In a multiphase rendering algorithm, intermediate data might be copied to device memory multiple times, as shown in Figure 1.

Figure 1

Render and compute passes communicating through device memory

Render and compute passes communicating through device memory

Tile shaders are compute or fragment functions that execute as part of a render pass, allowing for midrender compute with persistent memory between rendering phases. Figure 2 shows that the tile memory that tile shaders work within remains in the on-chip memory of the graphics processing unit (GPU). As a result, you avoid having to store intermediate results out to device memory. Tile memory from one phase is available to any subsequent fragment phases.

Figure 2

Render and compute passes communicating through tile memory

Render and compute passes communicating through tile memory

See Also

GPU Family 4 Features

About Imageblocks

Learn how imageblocks allow you to define and manipulate custom per-pixel data structures in high-bandwidth tile memory.

About Raster Order Groups

Learn about precisely controlling the order of parallel fragment shader threads accessing the same pixel coordinates.

About Enhanced MSAA and Imageblock Sample Coverage Control

Learn about accessing multisample tracking data within a tile shader, enabling development of custom MSAA resolve algorithms, and more.