本页内容

RenderOutputProvider QML Type

用作访问各渲染通道中提供的纹理的桥梁。更多...

Import Statement: import QtQuick3D.Helpers
Since: Qt 6.11
Inherits:

TextureProviderExtension

属性

详细说明

此类型用于提供由渲染管线中的各个通道生成的纹理。

例如,当您需要访问由 ZPrePass 生成的深度纹理,或由 SSAO 渲染阶段生成的环境光遮蔽纹理时,此类型便十分有用。该类型可用于访问这些生成的纹理,并在材质或特效中加以利用。

Texture {
    textureProvider: RenderOutputProvider {
        // Specify the pass buffer texture you want to access
        textureSource: RenderOutputProvider.DepthTexture
    }
}

另请参阅 QQuick3DTextureProviderExtension 和QSSGRenderExtension 。

属性文档

attachmentSelector : enumeration

选择将用户自定义的RenderPass 的哪个颜色附件作为纹理显示。仅当textureSource 设置为UserPassTexture 时才适用。

常量描述
RenderOutputProvider.Attachment0使用颜色附件 0(默认)。
RenderOutputProvider.Attachment1使用颜色附件 1。
RenderOutputProvider.Attachment2使用颜色附件 2。
RenderOutputProvider.Attachment3使用颜色附件 3。

另请参阅 renderPass 和textureSource 。

renderPass : RenderPass

RenderPass ,其输出附件将作为纹理显示。设置此属性会自动将textureSource 设置为UserPassTexture 。使用attachmentSelector 来选择要显示的通道中的哪个颜色附件。

另请参阅 attachmentSelector 、textureSource 和RenderPass 。

textureSource : enumeration

该属性用于指定要显示的缓冲区纹理。

常量描述
RenderOutputProvider.None未选择任何纹理源。
RenderOutputProvider.UserPassTexture访问来自用户定义的RenderPass 的颜色附件。使用renderPass 和attachmentSelector 属性来指定要使用的通道和附件。
RenderOutputProvider.AoTexture由QtQuick3D 的SSAO通道创建的环境光遮蔽纹理。
RenderOutputProvider.DepthTexture由QtQuick3D 的深度预渲染通道生成的深度纹理。
RenderOutputProvider.ScreenTexture包含渲染场景的纹理。
RenderOutputProvider.NormalTexture由QtQuick3D 的法线预渲染通道生成的世界空间法线贴图。
RenderOutputProvider.MotionVectorTexture由QtQuick3D 的运动向量渲染通道生成的运动向量贴图。

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