Nesta página

ColorAttachment QML Type

Define um atributo de cor para uma passagem de renderização. Mais...

Import Statement: import QtQuick3D
Since: Qt 6.11
Inherits:

Command

Propriedades

Descrição detalhada

O tipo ColorAttachment é usado para especificar um anexo de cor para um objeto do tipo ` RenderPass`. A propriedade ` name ` é usada para identificar o anexo dentro da passagem de renderização. Se for utilizado o modo ` RenderPass.AugmentMaterial `, o nome será exposto como uma saída com ` name ` no shader de fragmento.

RenderPass {
    // Define a render target texture
    RenderPassTexture {
        id: colorTexture
        format: RenderPassTexture.RGBA16F
    }

    commands: [
        // Define a color attachment using the texture
        ColorAttachment {
            name: "color0"
            target: colorTexture
        }
    ]
}

Consulte também RenderPassTexture.

Documentação da propriedade

name : string

O nome usado para identificar esse anexo de cor dentro da passagem de renderização. Quando a opção “ materialMode ” (Anexo de cor) está definida como “ AugmentMaterial ” (Anotado), esse nome é exposto como uma variável de saída do shader de fragmento, permitindo que o código do shader personalizado grave nesse anexo.

target : RenderPassTexture

O arquivo ` RenderPassTexture ` que será usado como anexo de cor. A textura deve estar em um formato compatível com cores (por exemplo, RGBA8, RGBA16F).

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