[Interest] Qt3D: One-shot compute shader

Paul Lemire paul.lemire at kdab.com
Mon Jun 3 07:04:13 CEST 2019


If you can use Qt 5.13, ComputeCommand has a runType
property(Continuous/Manual) and a trigger function which you can use for
one shot compute calls.


https://doc-snapshots.qt.io/qt5-5.13/qt3drender-qcomputecommand.html


Another option would be to set the enabled property of your
DispatchCompute FG node to false once you know you don't need to execute
your compute shader.


Paul


On 6/1/19 1:21 AM, Daniel Proksch wrote:
> Hi all,
>
> I'm trying to implement a Qt3D FrameGraph (QML) that allows for
> one-shot dispatch of a compute shader.
> My current approach is to add a ComputeCommand component to my
> ComputeEntity whenever I want the dispatch to happen.
> When the compute task is done (i.e. in the next frame) I want to
> remove the ComputeCommand component again, so that the shader is no
> longer invoked.
>
> Is that approach reasonable?
> And is there a signal that is triggered whenever a frame is completed
> (so that I can remove the ComputeCommand)?
>
> Many thanks!
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190603/066ac6bc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4282 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20190603/066ac6bc/attachment.bin>


More information about the Interest mailing list