ComputeCommand QML Type

为 GPU 上的计算着色器发布工作的组件。更多

Import Statement: import Qt3D.Render 2.9
In C++: QComputeCommand
Inherits:

Component3D

Status: Deprecated

属性

详细说明

ComputeCommand 用于为计算着色器发布工作。计算着色器在添加 ComputeCommand 的同一实体的材质组件中指定。workGroupXworkGroupYworkGroupZ 属性指定了调用计算着色器的工作组大小。DispatchCompute 节点必须存在于 FrameGraph 中,以便实际发出命令。计算命令的执行行为可通过运行类型属性进行控制。

注意: 如果渲染策略设置为RenderSettings.OnDemand,运行类型设置为 Continuous,且场景没有变化,则不会重复调用 ComputeCommand。如果场景没有其他变化触发渲染新帧,则必须设置RenderSettings.Always 渲染策略才能重复调用 ComputeCommand。

属性文档

runType : enumeration

指定计算命令是每帧执行还是手动触发。

常量说明
ComputeCommand.Continuous每帧执行计算命令。这是默认设置。
ComputeCommand.Manual在给定帧数内执行 CompouteCommand,然后组件自行禁用。

workGroupX : int

指定 X 工作组大小。


workGroupY : int

指定 Y 工作组大小。


workGroupZ : int

指定 Z 工作组大小。


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