| @@ -0,0 +1,177 @@ |
| | 1 | // |
| | 2 | // Antialiasing.qml |
| | 3 | // |
| | 4 | // Created by Sam Gateau on 8/14/2017 |
| | 5 | // Copyright 2016 High Fidelity, Inc. |
| | 6 | // |
| | 7 | // Distributed under the Apache License, Version 2.0. |
| | 8 | // See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html |
| | 9 | // |
| | 10 | |
| | 11 | import QtQuick 2.7 |
| | 12 | import QtQuick.Controls 1.4 |
| | 13 | import QtQuick.Layouts 1.3 |
| | 14 | |
| | 15 | import "qrc:///qml/styles-uit" |
| | 16 | import "qrc:///qml/controls-uit" as HifiControls |
| | 17 | |
| | 18 | import "configSlider" |
| | 19 | import "../lib/plotperf" |
| | 20 | |
| | 21 | Item { |
| | 22 | Rectangle { |
| | 23 | id: root; |
| | 24 | |
| | 25 | HifiConstants { id: hifi; } |
| | 26 | color: hifi.colors.baseGray; |
| | 27 | |
| | 28 | Column { |
| | 29 | id: antialiasing |
| | 30 | spacing: 20 |
| | 31 | padding: 10 |
| | 32 | |
| | 33 | Column{ |
| | 34 | spacing: 10 |
| | 35 | |
| | 36 | Row { |
| | 37 | spacing: 10 |
| | 38 | id: fxaaOnOff |
| | 39 | property bool debugFXAA: false |
| | 40 | HifiControls.Button { |
| | 41 | text: { |
| | 42 | if (fxaaOnOff.debugFXAA) { |
| | 43 | return "FXAA" |
| | 44 | } else { |
| | 45 | return "TAA" |
| | 46 | } |
| | 47 | } |
| | 48 | onClicked: { |
| | 49 | fxaaOnOff.debugFXAA = !fxaaOnOff.debugFXAA |
| | 50 | if (fxaaOnOff.debugFXAA) { |
| | 51 | Render.getConfig("RenderMainView.JitterCam").none(); |
| | 52 | Render.getConfig("RenderMainView.Antialiasing").debugFXAAX = 0; |
| | 53 | } else { |
| | 54 | Render.getConfig("RenderMainView.JitterCam").play(); |
| | 55 | Render.getConfig("RenderMainView.Antialiasing").debugFXAAX = 1.0; |
| | 56 | } |
| | 57 | |
| | 58 | } |
| | 59 | } |
| | 60 | } |
| | 61 | Separator {} |
| | 62 | Row { |
| | 63 | spacing: 10 |
| | 64 | |
| | 65 | HifiControls.Button { |
| | 66 | text: { |
| | 67 | var state = 2 - (Render.getConfig("RenderMainView.JitterCam").freeze * 1 - Render.getConfig("RenderMainView.JitterCam").stop * 2); |
| | 68 | if (state === 2) { |
| | 69 | return "Jitter" |
| | 70 | } else if (state === 1) { |
| | 71 | return "Paused at " + Render.getConfig("RenderMainView.JitterCam").index + "" |
| | 72 | } else { |
| | 73 | return "No Jitter" |
| | 74 | } |
| | 75 | } |
| | 76 | onClicked: { Render.getConfig("RenderMainView.JitterCam").cycleStopPauseRun(); } |
| | 77 | } |
| | 78 | HifiControls.Button { |
| | 79 | text: "<" |
| | 80 | onClicked: { Render.getConfig("RenderMainView.JitterCam").prev(); } |
| | 81 | } |
| | 82 | HifiControls.Button { |
| | 83 | text: ">" |
| | 84 | onClicked: { Render.getConfig("RenderMainView.JitterCam").next(); } |
| | 85 | } |
| | 86 | } |
| | 87 | Separator {} |
| | 88 | HifiControls.CheckBox { |
| | 89 | boxSize: 20 |
| | 90 | text: "Constrain color" |
| | 91 | checked: Render.getConfig("RenderMainView.Antialiasing")["constrainColor"] |
| | 92 | onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["constrainColor"] = checked } |
| | 93 | } |
| | 94 | ConfigSlider { |
| | 95 | label: qsTr("Covariance gamma") |
| | 96 | integral: false |
| | 97 | config: Render.getConfig("RenderMainView.Antialiasing") |
| | 98 | property: "covarianceGamma" |
| | 99 | max: 1.5 |
| | 100 | min: 0.5 |
| | 101 | } |
| | 102 | Separator {} |
| | 103 | HifiControls.CheckBox { |
| | 104 | boxSize: 20 |
| | 105 | text: "Feedback history color" |
| | 106 | checked: Render.getConfig("RenderMainView.Antialiasing")["feedbackColor"] |
| | 107 | onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["feedbackColor"] = checked } |
| | 108 | } |
| | 109 | |
| | 110 | ConfigSlider { |
| | 111 | label: qsTr("Source blend") |
| | 112 | integral: false |
| | 113 | config: Render.getConfig("RenderMainView.Antialiasing") |
| | 114 | property: "blend" |
| | 115 | max: 1.0 |
| | 116 | min: 0.0 |
| | 117 | } |
| | 118 | |
| | 119 | ConfigSlider { |
| | 120 | label: qsTr("Post sharpen") |
| | 121 | integral: false |
| | 122 | config: Render.getConfig("RenderMainView.Antialiasing") |
| | 123 | property: "sharpen" |
| | 124 | max: 1.0 |
| | 125 | min: 0.0 |
| | 126 | } |
| | 127 | Separator {} |
| | 128 | Row { |
| | 129 | |
| | 130 | spacing: 10 |
| | 131 | HifiControls.CheckBox { |
| | 132 | boxSize: 20 |
| | 133 | text: "Debug" |
| | 134 | checked: Render.getConfig("RenderMainView.Antialiasing")["debug"] |
| | 135 | onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["debug"] = checked } |
| | 136 | } |
| | 137 | HifiControls.CheckBox { |
| | 138 | boxSize: 20 |
| | 139 | text: "Show Debug Cursor" |
| | 140 | checked: Render.getConfig("RenderMainView.Antialiasing")["showCursorPixel"] |
| | 141 | onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["showCursorPixel"] = checked } |
| | 142 | } |
| | 143 | } |
| | 144 | ConfigSlider { |
| | 145 | label: qsTr("Debug Region <") |
| | 146 | integral: false |
| | 147 | config: Render.getConfig("RenderMainView.Antialiasing") |
| | 148 | property: "debugX" |
| | 149 | max: 1.0 |
| | 150 | min: 0.0 |
| | 151 | } |
| | 152 | HifiControls.CheckBox { |
| | 153 | boxSize: 20 |
| | 154 | text: "Closest Fragment" |
| | 155 | checked: Render.getConfig("RenderMainView.Antialiasing")["showClosestFragment"] |
| | 156 | onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["showClosestFragment"] = checked } |
| | 157 | } |
| | 158 | ConfigSlider { |
| | 159 | label: qsTr("Debug Velocity Threshold [pix]") |
| | 160 | integral: false |
| | 161 | config: Render.getConfig("RenderMainView.Antialiasing") |
| | 162 | property: "debugShowVelocityThreshold" |
| | 163 | max: 50 |
| | 164 | min: 0.0 |
| | 165 | } |
| | 166 | ConfigSlider { |
| | 167 | label: qsTr("Debug Orb Zoom") |
| | 168 | integral: false |
| | 169 | config: Render.getConfig("RenderMainView.Antialiasing") |
| | 170 | property: "debugOrbZoom" |
| | 171 | max: 32.0 |
| | 172 | min: 1.0 |
| | 173 | } |
| | 174 | } |
| | 175 | } |
| | 176 | } |
| | 177 | } |