In questa pagina

DepthTextureAttachment QML Type

Definisce un allegato di texture di profondità per un ` pass`. Altro...

Import Statement: import QtQuick3D
Since: Qt 6.11
Inherits:

Command

Proprietà

Descrizione dettagliata

DepthTextureAttachment associa un oggetto ` RenderPassTexture ` con un formato di profondità come buffer di profondità per un oggetto ` RenderPass`. A differenza di ` DepthStencilAttachment ` (che utilizza un buffer di rendering opaco), i dati di profondità risultanti vengono memorizzati in una texture che può essere letta dai passaggi successivi tramite ` 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
    }
}

Vedi anche RenderPassTexture, DepthStencilAttachment e RenderOutputProvider.

Documentazione delle proprietà

target : RenderPassTexture

L'RenderPassTexture, che verrà utilizzato come attachment di profondità. La texture deve avere un formato compatibile con la profondità (ad esempio Depth16, Depth24, Depth32 o 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.