Buffer QML Type

创建或引用一个颜色缓冲区,用于效果的传递。更多

Import Statement: import QtQuick3D
Inherits:

QtObject

属性

详细说明

缓冲区(Buffer)可用于创建中间缓冲区,以便在Effect 中的render passes 之间共享数据。

注意: 如果 Buffer 的name 属性为空,它将引用渲染传递的默认输出纹理。

属性文档

bufferFlags : enumeration

指定缓冲区分配标志。默认值为 Buffer.None。

常量说明
Buffer.None无特殊行为。
Buffer.SceneLifetime在场景的整个生命周期内都会分配缓冲区。

format : enumeration

指定纹理格式。默认值为 Buffer.RGBA8。

常量
Buffer.RGBA8
Buffer.RGBA16F
Buffer.RGBA32F
Buffer.R8
Buffer.R16
Buffer.R16F
Buffer.R32F

name : string

指定缓冲区的名称。

注意: 当此属性为空时,缓冲区将引用render pass 的默认输出纹理,而不是分配一个缓冲区。这有助于覆盖某些输出设置(如纹理格式),而无需引入新的、单独的中间纹理。


sizeMultiplier : real

指定缓冲区的大小乘数。例如,值为1.0 的缓冲区与效果的输入纹理大小相同,而值为0.5 的缓冲区宽度和高度均为效果的一半。默认值为 1.0。


textureCoordOperation : enumeration

指定在 [0, 1] 范围之外采样时纹理坐标的行为。默认值为 Buffer.ClampToEdge。

常数说明
Buffer.ClampToEdge将坐标夹紧到边缘。
Buffer.Repeat在边缘缠绕坐标以平铺纹理。
Buffer.MirroredRepeat缠绕边缘坐标,但在平铺纹理时镜像纹理。

textureFilterOperation : enumeration

指定对 Buffer 内容采样时的纹理过滤模式。默认值为 Buffer.Linear(线性)。

常量说明
Buffer.Nearest使用近邻过滤。
Buffer.Linear使用线性过滤。

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