在本页

ColorAttachment QML Type

pass 定义颜色附件 ... 更多...

Import Statement: import QtQuick3D
Since: Qt 6.11
Inherits:

Command

详细描述

ColorAttachment 类型用于为RenderPass 指定颜色附件。name 属性用于在渲染传递中识别该附件。如果使用了 AugmentMaterial(增强材质)模式,名称将作为name 输出到片段着色器中。

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
        }
    ]
}

另请参阅 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.