import QtQuick 2.7 import QtQuick.Controls 1.4 import QtQuick.Layouts 1.3 import "qrc:///qml/styles-uit" import "qrc:///qml/controls-uit" as HifiControls import "configSlider" import "../lib/jet/qml" as Jet Rectangle { HifiConstants { id: hifi;} id: render; anchors.margins: hifi.dimensions.contentMargin.x color: hifi.colors.baseGray; property var mainViewTask: Render.getConfig("RenderMainView") Column { spacing: 5 anchors.left: parent.left anchors.right: parent.right anchors.margins: hifi.dimensions.contentMargin.x //padding: hifi.dimensions.contentMargin.x HifiControls.Label { text: "Shading" } Row { anchors.left: parent.left anchors.right: parent.right spacing: 5 } Separator {} Column { anchors.left: parent.left anchors.right: parent.right spacing: 5 Repeater { model: [ "Tone Mapping Exposure:ToneMapping:exposure:5.0:-5.0" ] ConfigSlider { label: qsTr(modelData.split(":")[0]) integral: false config: render.mainViewTask.getConfig(modelData.split(":")[1]) property: modelData.split(":")[2] max: modelData.split(":")[3] min: modelData.split(":")[4] anchors.left: parent.left anchors.right: parent.right } } Item { height: childrenRect.height anchors.left: parent.left anchors.right: parent.right HifiControls.Label { text: "Tone Mapping Curve" anchors.left: parent.left } HifiControls.ComboBox { anchors.right: parent.right currentIndex: 1 model: ListModel { id: cbItems ListElement { text: "RGB"; color: "Yellow" } ListElement { text: "SRGB"; color: "Green" } ListElement { text: "Reinhard"; color: "Yellow" } ListElement { text: "Filmic"; color: "White" } } width: 200 onCurrentIndexChanged: { render.mainViewTask.getConfig("ToneMapping")["curve"] = currentIndex } } } } Separator {} id: root property var config: Render.getConfig("RenderMainView.Bloom") property var configThreshold: Render.getConfig("RenderMainView.BloomThreshold") property var configDebug: Render.getConfig("RenderMainView.DebugBloom") HifiControls.Label { text: "Bloom Effect" } Column { spacing: 8 CheckBox { text: "Enable" checked: root.config["enabled"] onCheckedChanged: { root.config["enabled"] = checked; } } GroupBox { title: "Debug" Row { ExclusiveGroup { id: debugGroup } RadioButton { text : "Off" checked : !root.configDebug["enabled"] onCheckedChanged: { if (checked) { root.configDebug["enabled"] = false } } exclusiveGroup : debugGroup } RadioButton { text : "Lvl 0" checked :root.configDebug["enabled"] && root.configDebug["mode"]==0 onCheckedChanged: { if (checked) { root.configDebug["enabled"] = true root.configDebug["mode"] = 0 } } exclusiveGroup : debugGroup } RadioButton { text : "Lvl 1" checked : root.configDebug["enabled"] && root.configDebug["mode"]==1 onCheckedChanged: { if (checked) { root.configDebug["enabled"] = true root.configDebug["mode"] = 1 } } exclusiveGroup : debugGroup } RadioButton { text : "Lvl 2" checked : root.configDebug["enabled"] && root.configDebug["mode"]==2 onCheckedChanged: { if (checked) { root.configDebug["enabled"] = true root.configDebug["mode"] = 2 } } exclusiveGroup : debugGroup } RadioButton { text : "All" checked : root.configDebug["enabled"] && root.configDebug["mode"]==3 onCheckedChanged: { if (checked) { root.configDebug["enabled"] = true root.configDebug["mode"] = 3 } } exclusiveGroup : debugGroup } } } ConfigSlider { label: "Intensity" integral: false config: root.config property: "intensity" max: 1.0 min: 0.0 width: 280 height:38 } ConfigSlider { label: "Size" integral: false config: root.config property: "size" max: 1.0 min: 0.0 width: 280 height:38 } ConfigSlider { label: "Threshold" integral: false config: root.configThreshold property: "threshold" max: 2.0 min: 0.0 width: 280 height:38 } } } }