Debian Codegraph @

tests/benchmarks/Qt3DBench/Qt3DBenchFrameGraph.qml

raw
1 // Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4 import Qt3D.Core 2.0
5 import Qt3D.Render 2.0
6 import QtQuick 2.2 as QQ2
7
8 FrameGraph {
9 id: root
10
11 property alias viewCamera: viewCameraSelector.camera
12 property alias lightCamera: lightCameraSelector.camera
13 readonly property Texture2D shadowTexture: depthTexture
14
15 activeFrameGraph: Viewport {
16 rect: Qt.rect(0.0, 0.0, 1.0, 1.0)
17 clearColor: Qt.rgba(0.0, 0.0, 0.0, 1.0)
18
19 RenderPassFilter {
20 includes: [ FilterKey { name: "pass"; value: "shadowmap" } ]
21
22 RenderTargetSelector {
23 target: RenderTarget {
24 attachments: [
25 RenderAttachment {
26 name: "depth"
27 type: RenderAttachment.DepthAttachment
28 texture: Texture2D {
29 id: depthTexture
30 width: 1024
31 height: 1024
32 format: Texture.DepthFormat
33 generateMipMaps: false
34 magnificationFilter: Texture.Linear
35 minificationFilter: Texture.Linear
36 wrapMode {
37 x: WrapMode.ClampToEdge
38 y: WrapMode.ClampToEdge
39 }
40 comparisonFunction: Texture.CompareLessEqual
41 comparisonMode: Texture.CompareRefToTexture
42 }
43 }
44 ]
45 }
46
47 ClearBuffers {
48 buffers: ClearBuffers.DepthBuffer
49
50 CameraSelector {
51 id: lightCameraSelector
52 }
53 }
54 }
55 }
56
57 RenderPassFilter {
58 includes: [ FilterKey { name: "pass"; value: "forward" } ]
59
60 ClearBuffers {
61 buffers : ClearBuffers.ColorDepthBuffer
62
63 CameraSelector {
64 id: viewCameraSelector
65 }
66 }
67 }
68 }
69 }