The Visibility Buffer: A Cache-Friendly Approach to Deferred Shading

The Visibility Buffer: A Cache-Friendly Approach to Deferred Shading
复制标题

可见性缓冲区:一种缓存友好的延迟着色方法

DOI:
--
复制
发表时间:
2013
期刊:
影响因子:
--
通讯作者:
W. Hunt
W. Hunt
中科院分区:
--
文献类型:
--
作者:
Christopher A. Burns;W. Hunt

文献摘要

被引文献

相似文献

正向渲染管道按三角形提交顺序对片段进行着色。因此,不可见片段在随后被遮挡之前通常会被浪费地着色,这种现象称为过度着色。避免过度着色的一种流行方法是仅在前向传递期间计算每个片段的表面属性并将其存储在缓冲区中。照明在后续通道中执行,消耗属性缓冲区。这种策略通常称为延迟着色。我们发现了两个显着的缺陷。首先,几何表面属性的缓冲区(g 缓冲区)很大,每个可见性样本通常有 20 多个字节。在移动或集成 GPU 上,读取和写入大型 g 缓冲区所需的带宽可能令人望而却步。其次,着色工作和可见性的分离并不完全。在前向传递中对被遮挡片段急切地计算表面属性,浪费纹理带宽和计算资源。为了解决这些问题,我们建议用一个简单的可见性缓冲区替换 g 缓冲区,该缓冲区仅存储每个样本的三角形索引和实例 ID,编码仅需四个字节。这显着降低了存储和带宽要求。生成可见性缓冲区比生成 g 缓冲区更便宜,并且不需要纹理读取或任何
Forward rendering pipelines shade fragments in triangle-submission order. Consequently, non-visible fragments are often wastefully shaded before being subsequently occluded—a phenomenon known as over-shading. A popular way to avoid over-shading is to only compute surface attributes for each fragment during a forward pass and store them in a buffer. Lighting is performed in a subsequent pass, consuming the attributes buffer. This strategy is commonly known as deferred shading. We identify two notable deficits. First, the buffer for the geometric surface attributes— the g-buffer—is large, often 20+ bytes per visibility sample. The bandwidth required to read and write large g-buffers can be prohibitive on mobile or integrated GPUs. Second, the separation of shading work and visibility is incomplete. Surface attributes are eagerly computed in the forward pass on occluded fragments, wasting texture bandwidth and compute resources. To address these problems, we propose to replace the g-buffer with a simple visibility buffer that only stores a triangle index and instance ID per sample, encoded in as few as four bytes. This significantly reduces storage and bandwidth requirements. Generating a visibility buffer is cheaper than generating a g-buffer and does not require texture reads or any