描述

深度渲染纹理格式。

深度格式用于将高精度“depth”值渲染到渲染纹理。实际使用 哪种格式取决于平台。在 OpenGL 上,将使用原生“depth component”格式 (通常为 24 或 16 位),在 Direct3D9 上,将使用 32 位浮点“R32F”格式。在编写 使用或渲染到深度纹理中的着色器时,必须注意确保它们都 在 OpenGL 和 Direct3D 上工作,请参阅 depth textures documentation

请注意,并非所有显卡都支持深度纹理。请使用 SystemInfo.SupportsRenderTextureFormat 检查支持情况。

另请参阅:RenderTexture.formatRenderTexture 类、SystemInfo.SupportsRenderTextureFormat