En esta página

DepthTextureAttachment QML Type

Define un complemento de textura de profundidad para un objeto « pass ». Más información...

Import Statement: import QtQuick3D
Since: Qt 6.11
Inherits:

Command

Propiedades

Descripción detallada

DepthTextureAttachment adjunta una « RenderPassTexture » con un formato de profundidad como búfer de profundidad para un « RenderPass ». A diferencia de « DepthStencilAttachment » (que utiliza un búfer de renderizado opaco), los datos de profundidad resultantes se almacenan en una textura que puede leerse en pasadas posteriores mediante « 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
    }
}

Véase también RenderPassTexture, DepthStencilAttachment y RenderOutputProvider.

Documentación de propiedades

target : RenderPassTexture

El archivo « RenderPassTexture » que se utilizará como complemento de profundidad. La textura debe tener un formato compatible con la profundidad (por ejemplo, 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.