Nesta página

DepthTextureAttachment QML Type

Define um anexo de textura de profundidade para um objeto ` pass`. Mais...

Import Statement: import QtQuick3D
Since: Qt 6.11
Inherits:

Command

Propriedades

Descrição detalhada

O DepthTextureAttachment vincula um objeto ` RenderPassTexture ` com um formato de profundidade como o buffer de profundidade para um objeto ` RenderPass`. Ao contrário do ` DepthStencilAttachment ` (que utiliza um buffer de renderização opaco), os dados de profundidade resultantes são armazenados em uma textura que pode ser lida por passagens subsequentes por meio de ` 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
    }
}

Consulte também RenderPassTexture, DepthStencilAttachment e RenderOutputProvider.

Documentação das propriedades

target : RenderPassTexture

A imagem “ RenderPassTexture ” que será usada como anexo de profundidade. A textura deve ter um formato compatível com profundidade (por exemplo, Depth16, Depth24, Depth32 ou 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.