DepthTextureAttachment QML Type
| Import Statement: | import QtQuick3D |
| Since: | Qt 6.11 |
| Inherits: |
属性
- target : RenderPassTexture
详细说明
DepthTextureAttachment 将具有深度格式的RenderPassTexture 附加为RenderPass 的深度缓冲区。与DepthStencilAttachment (其使用不透明渲染缓冲区)不同,生成的深度数据存储在纹理中,后续渲染阶段可通过RenderOutputProvider 读取该纹理。
RenderPassTexture {
id: depthTexture
format: RenderPassTexture.Depth24
}
RenderPass {
commands: [
ColorAttachment { name: "color0"; target: colorTexture },
DepthTextureAttachment { target: depthTexture }
]
}
// Expose the depth texture to a material via RenderOutputProvider
Texture {
textureProvider: RenderOutputProvider {
textureSource: RenderOutputProvider.UserPassTexture
renderPass: myRenderPass
}
}另请参阅 RenderPassTexture 、DepthStencilAttachment 和RenderOutputProvider 。
属性文档
target : RenderPassTexture
将用作深度附件的RenderPassTexture 。该纹理必须采用与深度兼容的格式(例如:Depth16 、Depth24 、Depth32 或Depth24Stencil8 )。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.