summaryrefslogtreecommitdiffstats
path: root/tests/manual/compute-particles/ComputeFrameGraph.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/compute-particles/ComputeFrameGraph.qml')
-rw-r--r--tests/manual/compute-particles/ComputeFrameGraph.qml41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/manual/compute-particles/ComputeFrameGraph.qml b/tests/manual/compute-particles/ComputeFrameGraph.qml
new file mode 100644
index 000000000..4ceca993c
--- /dev/null
+++ b/tests/manual/compute-particles/ComputeFrameGraph.qml
@@ -0,0 +1,41 @@
+// Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB).
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import Qt3D.Core 2.0
+import Qt3D.Render 2.9
+
+Viewport {
+ property alias camera: selector.camera
+
+ RenderSurfaceSelector {
+ id: surfaceSelector
+
+ // Clear Buffer
+ ClearBuffers {
+ buffers: ClearBuffers.ColorDepthBuffer
+ NoDraw {}
+ }
+
+ // Compute Pass
+ DispatchCompute {
+ workGroupX: 50; workGroupY: 1; workGroupZ: 1
+ TechniqueFilter {
+ matchAll: [
+ FilterKey { name: "type"; value: "compute"}
+ ]
+ }
+ }
+
+ // Draw particles from buffer computed in the Compute Pass
+ CameraSelector {
+ id: selector
+ TechniqueFilter {
+ MemoryBarrier { waitFor: MemoryBarrier.VertexAttributeArray }
+ matchAll: [
+ FilterKey { name: "type"; value: "draw"}
+ ]
+ }
+ }
+ }
+}
+