|
说说我大概的理解(可能有些偏差,因为它的应用场景应该只存在于管线开发中,我没怎么申请过zbuffer)
zbuffer是在显卡中实现的特殊的缓冲区,你所谓的不就是从GPU拿到纹理数据 其中还经过了大量提高性能成本(无损解压缩等用于解决带宽和优化速度),现代的图形显卡都有对其的特殊优化, 虽然我们每帧都在使用它但是大部分情况下的开发工作是用不到的它的
再引用下unity的官方文档来说就是这个
Under the hood
Depth textures can come directly from the actual depth buffer
, or be rendered in a separate pass, depending on the rendering path used and the hardware. Typically when using Deferred Shading or Legacy Deferred Lighting rendering paths
, the depth textures come “for free” since they are a product of the G-buffer rendering anyway.
When the DepthNormals texture is rendered in a separate pass, this is done through Shader Replacement. Hence it is important to have correct “RenderType” tag in your shaders.
When enabled, the MotionVectors texture always comes from a extra render pass. Unity will render moving GameObjects
into this buffer, and construct their motion from the last frame to the current frame. |
|