Nesta página

DepthStencilAttachment QML Type

Define um anexo de profundidade-stencil para um ` RenderPass`. Mais...

Import Statement: import QtQuick3D
Since: Qt 6.11
Inherits:

Command

Descrição detalhada

O `DepthStencilAttachment` adiciona um buffer de renderização implícito de profundidade/estêncil a um ` RenderPass`. O buffer de renderização é criado e gerenciado automaticamente pelo sistema de renderização. Como ele é baseado em um buffer de renderização opaco, em vez de uma textura, seu conteúdo não pode ser amostrado em shaders. Se você precisar ler os valores de profundidade em uma passagem posterior, use ` DepthTextureAttachment ` em vez disso.

Use o DepthStencilAttachment quando precisar de testes de profundidade e/ou operações de estêncil em uma passagem, mas não precisar acessar os dados de profundidade posteriormente.

RenderPass {
    commands: [
        ColorAttachment { name: "color0"; target: colorTexture },
        // Add a depth buffer so depth testing works in this pass
        DepthStencilAttachment {}
    ]
}

Consulte também ` DepthTextureAttachment ` e ` RenderPassTexture`.

© 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.