In questa pagina

DepthStencilAttachment QML Type

Definisce un attachment depth-stencil per un oggetto ` RenderPass`. Altro...

Import Statement: import QtQuick3D
Since: Qt 6.11
Inherits:

Command

Descrizione dettagliata

DepthStencilAttachment aggiunge un buffer di rendering implicito di profondità/stencil a un oggetto di tipo ` RenderPass`. Il buffer di rendering viene creato e gestito automaticamente dal sistema di rendering. Poiché è supportato da un buffer di rendering opaco anziché da una texture, il suo contenuto non può essere campionato negli shader. Se è necessario rileggere i valori di profondità in un passaggio successivo, utilizzare invece ` DepthTextureAttachment `.

Utilizzare `DepthStencilAttachment` quando sono necessarie operazioni di depth testing e/o stencil in un passaggio, ma non è necessario accedere ai dati di profondità in seguito.

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

Vedi anche 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.