Shadow caster culling fix
Showing the changes to scripts/developer (2 of 27 files). Show all
Unified · Split
| @@ -0,0 +1,20 @@ | |||
| 1 | // | ||
| 2 | // debugShadow.js | ||
| 3 | // developer/utilities/render | ||
| 4 | // | ||
| 5 | // Olivier Prat, created on 10/25/2017. | ||
| 6 | // Copyright 2017 High Fidelity, Inc. | ||
| 7 | // | ||
| 8 | // Distributed under the Apache License, Version 2.0. | ||
| 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | ||
| 10 | // | ||
| 11 | |||
| 12 | // Set up the qml ui | ||
| 13 | var qml = Script.resolvePath('shadow.qml'); | ||
| 14 | var window = new OverlayWindow({ | ||
| 15 | title: 'Shadow Debug', | ||
| 16 | source: qml, | ||
| 17 | width: 200, | ||
| 18 | height: 90 | ||
| 19 | }); | ||
| 20 | window.closed.connect(function() { Script.stop(); }); | ||
| @@ -0,0 +1,50 @@ | |||
| 1 | // | ||
| 2 | // shadow.qml | ||
| 3 | // developer/utilities/render | ||
| 4 | // | ||
| 5 | // Olivier Prat, created on 10/25/2017. | ||
| 6 | // Copyright 2017 High Fidelity, Inc. | ||
| 7 | // | ||
| 8 | // Distributed under the Apache License, Version 2.0. | ||
| 9 | // See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html | ||
| 10 | // | ||
| 11 | import QtQuick 2.5 | ||
| 12 | import QtQuick.Controls 1.4 | ||
| 13 | |||
| 14 | Column { | ||
| 15 | id: root | ||
| 16 | spacing: 8 | ||
| 17 | property var viewConfig: Render.getConfig("RenderMainView.DrawViewFrustum"); | ||
| 18 | property var shadowConfig: Render.getConfig("RenderMainView.DrawShadowFrustum"); | ||
| 19 | |||
| 20 | Component.onCompleted: { | ||
| 21 | viewConfig.enabled = true; | ||
| 22 | shadowConfig.enabled = true; | ||
| 23 | } | ||
| 24 | Component.onDestruction: { | ||
| 25 | viewConfig.enabled = false; | ||
| 26 | shadowConfig.enabled = false; | ||
| 27 | } | ||
| 28 | |||
| 29 | CheckBox { | ||
| 30 | text: "Freeze Frustums" | ||
| 31 | checked: false | ||
| 32 | onCheckedChanged: { | ||
| 33 | viewConfig.isFrozen = checked; | ||
| 34 | shadowConfig.isFrozen = checked; | ||
| 35 | } | ||
| 36 | } | ||
| 37 | Row { | ||
| 38 | spacing: 8 | ||
| 39 | Label { | ||
| 40 | text: "View" | ||
| 41 | color: "yellow" | ||
| 42 | font.italic: true | ||
| 43 | } | ||
| 44 | Label { | ||
| 45 | text: "Shadow" | ||
| 46 | color: "blue" | ||
| 47 | font.italic: true | ||
| 48 | } | ||
| 49 | } | ||
| 50 | } | ||