mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 20:13:40 +02:00
Clean up the utilities scrips of the render folder
This commit is contained in:
parent
692dc75977
commit
a03d3a1ca8
9 changed files with 0 additions and 368 deletions
|
@ -1,22 +0,0 @@
|
||||||
//
|
|
||||||
// BG.qml
|
|
||||||
// examples/utilities/tools/render
|
|
||||||
//
|
|
||||||
// Created by Zach Pomerantz on 2/8/2016
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
import QtQuick 2.5
|
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
|
|
||||||
Item {
|
|
||||||
Timer {
|
|
||||||
running: true; repeat: true
|
|
||||||
onTriggered: time.text = Render.getConfig("DrawBackgroundDeferred").gpuTime
|
|
||||||
}
|
|
||||||
|
|
||||||
Text { id: time; font.pointSize: 20 }
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
//
|
|
||||||
// debug.js
|
|
||||||
// examples/utilities/tools/render
|
|
||||||
//
|
|
||||||
// Zach Pomerantz, created on 1/27/2016.
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
oldConfig = Render.toJSON();
|
|
||||||
Render.RenderShadowTask.enabled = true;
|
|
||||||
var RDT = Render.RenderDeferredTask;
|
|
||||||
RDT.AmbientOcclusion.enabled = true;
|
|
||||||
RDT.DebugDeferredBuffer.enabled = false;
|
|
||||||
|
|
||||||
// Set up the qml ui
|
|
||||||
var qml = Script.resolvePath('main.qml');
|
|
||||||
var window = new OverlayWindow({
|
|
||||||
title: 'Render Engine Configuration',
|
|
||||||
source: qml,
|
|
||||||
width: 400, height: 900,
|
|
||||||
});
|
|
||||||
window.setPosition(25, 50);
|
|
||||||
window.closed.connect(function() { Script.stop(); });
|
|
||||||
|
|
||||||
// Debug buffer sizing
|
|
||||||
var resizing = false;
|
|
||||||
Controller.mousePressEvent.connect(function() { resizing = true; });
|
|
||||||
Controller.mouseReleaseEvent.connect(function() { resizing = false; });
|
|
||||||
Controller.mouseMoveEvent.connect(function(e) { resizing && setDebugBufferSize(e.x); });
|
|
||||||
function setDebugBufferSize(x) {
|
|
||||||
x = (2.0 * (x / Window.innerWidth) - 1.0); // scale
|
|
||||||
x = Math.min(Math.max(-1, x), 1); // clamp
|
|
||||||
Render.RenderDeferredTask.DebugDeferredBuffer.size = {x: x, y: -1, z: 1, w: 1};
|
|
||||||
}
|
|
||||||
|
|
||||||
Script.scriptEnding.connect(function() { Render.load(oldConfig); } );
|
|
|
@ -1,21 +0,0 @@
|
||||||
//
|
|
||||||
// debugBG.js
|
|
||||||
// examples/utilities/tools/render
|
|
||||||
//
|
|
||||||
// Zach Pomerantz, created on 1/27/2016.
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
// Set up the qml ui
|
|
||||||
var qml = Script.resolvePath('BG.qml');
|
|
||||||
var window = new OverlayWindow({
|
|
||||||
title: 'Background Timer',
|
|
||||||
source: qml,
|
|
||||||
width: 300
|
|
||||||
});
|
|
||||||
window.setPosition(25, 50);
|
|
||||||
window.closed.connect(function() { Script.stop(); });
|
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
//
|
|
||||||
// ddebugFramBuffer.js
|
|
||||||
// examples/utilities/tools/render
|
|
||||||
//
|
|
||||||
// Sam Gateau created on 2/18/2016.
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
var DDB = Render.RenderDeferredTask.DebugDeferredBuffer;
|
|
||||||
oldConfig = DDB.toJSON();
|
|
||||||
DDB.enabled = true;
|
|
||||||
|
|
||||||
|
|
||||||
// Set up the qml ui
|
|
||||||
var qml = Script.resolvePath('framebuffer.qml');
|
|
||||||
var window = new OverlayWindow({
|
|
||||||
title: 'Framebuffer Debug',
|
|
||||||
source: qml,
|
|
||||||
width: 400, height: 50,
|
|
||||||
});
|
|
||||||
window.setPosition(25, 50);
|
|
||||||
window.closed.connect(function() { Script.stop(); });
|
|
||||||
|
|
||||||
// Debug buffer sizing
|
|
||||||
var resizing = false;
|
|
||||||
|
|
||||||
Controller.mousePressEvent.connect(function (e) {
|
|
||||||
if (shouldStartResizing(e.x)) {
|
|
||||||
resizing = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Controller.mouseReleaseEvent.connect(function() { resizing = false; });
|
|
||||||
Controller.mouseMoveEvent.connect(function (e) { resizing && setDebugBufferSize(e.x); });
|
|
||||||
|
|
||||||
|
|
||||||
function shouldStartResizing(eventX) {
|
|
||||||
var x = Math.abs(eventX - Window.innerWidth * (1.0 + DDB.size.x) / 2.0);
|
|
||||||
var mode = DDB.mode;
|
|
||||||
return mode !== -1 && x < 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
function setDebugBufferSize(x) {
|
|
||||||
x = (2.0 * (x / Window.innerWidth) - 1.0); // scale
|
|
||||||
x = Math.min(Math.max(-1, x), 1); // clamp
|
|
||||||
DDB.size = { x: x, y: -1, z: 1, w: 1 };
|
|
||||||
}
|
|
||||||
|
|
||||||
Script.scriptEnding.connect(function () { DDB.fromJSON(oldConfig); });
|
|
|
@ -1,20 +0,0 @@
|
||||||
//
|
|
||||||
// debugToneMapping.js
|
|
||||||
//
|
|
||||||
// Created by Sam Gateau on 6/30/2016
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
// Set up the qml ui
|
|
||||||
var qml = Script.resolvePath('toneMapping.qml');
|
|
||||||
var window = new OverlayWindow({
|
|
||||||
title: 'Tone Mapping',
|
|
||||||
source: qml,
|
|
||||||
width: 400, height: 200,
|
|
||||||
});
|
|
||||||
window.setPosition(250, 1000);
|
|
||||||
window.closed.connect(function() { Script.stop(); });
|
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
//
|
|
||||||
// main.qml
|
|
||||||
// examples/utilities/tools/render
|
|
||||||
//
|
|
||||||
// Created by Zach Pomerantz on 2/8/2016
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
import QtQuick 2.5
|
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "configSlider"
|
|
||||||
|
|
||||||
Column {
|
|
||||||
spacing: 8
|
|
||||||
Column {
|
|
||||||
id: debug
|
|
||||||
property var config: Render.getConfig("DebugDeferredBuffer")
|
|
||||||
|
|
||||||
function setDebugMode(mode) {
|
|
||||||
debug.config.enabled = (mode != -1);
|
|
||||||
debug.config.mode = mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
ComboBox {
|
|
||||||
currentIndex: 0
|
|
||||||
model: ListModel {
|
|
||||||
id: cbItems
|
|
||||||
ListElement { text: "Off"; color: "Yellow" }
|
|
||||||
ListElement { text: "Depth"; color: "Green" }
|
|
||||||
ListElement { text: "Albedo"; color: "Yellow" }
|
|
||||||
ListElement { text: "Normal"; color: "White" }
|
|
||||||
ListElement { text: "Roughness"; color: "White" }
|
|
||||||
ListElement { text: "Metallic"; color: "White" }
|
|
||||||
ListElement { text: "Emissive"; color: "White" }
|
|
||||||
ListElement { text: "Unlit"; color: "White" }
|
|
||||||
ListElement { text: "Occlusion"; color: "White" }
|
|
||||||
ListElement { text: "Lightmap"; color: "White" }
|
|
||||||
ListElement { text: "Scattering"; color: "White" }
|
|
||||||
ListElement { text: "Lighting"; color: "White" }
|
|
||||||
ListElement { text: "Shadow"; color: "White" }
|
|
||||||
ListElement { text: "Linear Depth"; color: "White" }
|
|
||||||
ListElement { text: "Mid Curvature"; color: "White" }
|
|
||||||
ListElement { text: "Mid Normal"; color: "White" }
|
|
||||||
ListElement { text: "Low Curvature"; color: "White" }
|
|
||||||
ListElement { text: "Low Normal"; color: "White" }
|
|
||||||
ListElement { text: "Debug Scattering"; color: "White" }
|
|
||||||
ListElement { text: "Ambient Occlusion"; color: "White" }
|
|
||||||
ListElement { text: "Ambient Occlusion Blurred"; color: "White" }
|
|
||||||
ListElement { text: "Custom"; color: "White" }
|
|
||||||
}
|
|
||||||
width: 200
|
|
||||||
onCurrentIndexChanged: { debug.setDebugMode(currentIndex - 1) }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
//
|
|
||||||
// globalLight.qml
|
|
||||||
// examples/utilities/render
|
|
||||||
//
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
import QtQuick 2.5
|
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "configSlider"
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: root
|
|
||||||
spacing: 8
|
|
||||||
property var currentZoneID
|
|
||||||
property var zoneProperties
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
Entities.getProperties
|
|
||||||
sceneOctree.enabled = true;
|
|
||||||
itemSelection.enabled = true;
|
|
||||||
sceneOctree.showVisibleCells = false;
|
|
||||||
sceneOctree.showEmptyCells = false;
|
|
||||||
itemSelection.showInsideItems = false;
|
|
||||||
itemSelection.showInsideSubcellItems = false;
|
|
||||||
itemSelection.showPartialItems = false;
|
|
||||||
itemSelection.showPartialSubcellItems = false;
|
|
||||||
}
|
|
||||||
Component.onDestruction: {
|
|
||||||
sceneOctree.enabled = false;
|
|
||||||
itemSelection.enabled = false;
|
|
||||||
Render.getConfig("FetchSceneSelection").freezeFrustum = false;
|
|
||||||
Render.getConfig("CullSceneSelection").freezeFrustum = false;
|
|
||||||
}
|
|
|
@ -1,122 +0,0 @@
|
||||||
//
|
|
||||||
// main.qml
|
|
||||||
// examples/utilities/tools/render
|
|
||||||
//
|
|
||||||
// Created by Zach Pomerantz on 2/8/2016
|
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
import QtQuick 2.5
|
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import "configSlider"
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: root
|
|
||||||
spacing: 16
|
|
||||||
Switch {
|
|
||||||
checked: true
|
|
||||||
onClicked: ui.visible = checked
|
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: ui
|
|
||||||
spacing: 8
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
model: [ "Opaque:DrawOpaqueDeferred", "Transparent:DrawTransparentDeferred",
|
|
||||||
"Opaque Overlays:DrawOverlay3DOpaque", "Transparent Overlays:DrawOverlay3DTransparent" ]
|
|
||||||
ConfigSlider {
|
|
||||||
label: qsTr(modelData.split(":")[0])
|
|
||||||
integral: true
|
|
||||||
config: Render.getConfig(modelData.split(":")[1])
|
|
||||||
property: "maxDrawn"
|
|
||||||
max: config.numDrawn
|
|
||||||
min: -1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
|
||||||
CheckBox {
|
|
||||||
text: qsTr("Display Status")
|
|
||||||
onCheckedChanged: { Render.getConfig("DrawStatus").showDisplay = checked }
|
|
||||||
}
|
|
||||||
CheckBox {
|
|
||||||
text: qsTr("Network/Physics Status")
|
|
||||||
onCheckedChanged: { Render.getConfig("DrawStatus").showNetwork = checked }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ConfigSlider {
|
|
||||||
label: qsTr("Tone Mapping Exposure")
|
|
||||||
config: Render.getConfig("ToneMapping")
|
|
||||||
property: "exposure"
|
|
||||||
min: -10; max: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: ambientOcclusion
|
|
||||||
property var config: Render.getConfig("AmbientOcclusion")
|
|
||||||
|
|
||||||
Label { text: qsTr("Ambient Occlusion") }
|
|
||||||
// TODO: Add gpuTimer
|
|
||||||
CheckBox { text: qsTr("Dithering"); checked: ambientOcclusion.config.ditheringEnabled }
|
|
||||||
Repeater {
|
|
||||||
model: [
|
|
||||||
"Resolution Level:resolutionLevel:4",
|
|
||||||
"Obscurance Level:obscuranceLevel:1",
|
|
||||||
"Radius:radius:2",
|
|
||||||
"Falloff Bias:falloffBias:0.2",
|
|
||||||
"Edge Sharpness:edgeSharpness:1",
|
|
||||||
"Blur Radius:blurRadius:6",
|
|
||||||
"Blur Deviation:blurDeviation:3"
|
|
||||||
]
|
|
||||||
ConfigSlider {
|
|
||||||
label: qsTr(modelData.split(":")[0])
|
|
||||||
config: ambientOcclusion.config
|
|
||||||
property: modelData.split(":")[1]
|
|
||||||
max: modelData.split(":")[2]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Repeater {
|
|
||||||
model: [
|
|
||||||
"Samples:numSamples:32",
|
|
||||||
"Spiral Turns:numSpiralTurns:30:"
|
|
||||||
]
|
|
||||||
ConfigSlider {
|
|
||||||
label: qsTr(modelData.split(":")[0])
|
|
||||||
integral: true
|
|
||||||
config: ambientOcclusion.config
|
|
||||||
property: modelData.split(":")[1]
|
|
||||||
max: modelData.split(":")[2]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Column {
|
|
||||||
id: debug
|
|
||||||
property var config: Render.getConfig("DebugDeferredBuffer")
|
|
||||||
|
|
||||||
function setDebugMode(mode) {
|
|
||||||
debug.config.enabled = (mode != 0);
|
|
||||||
debug.config.mode = mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
Label { text: qsTr("Debug Buffer") }
|
|
||||||
ExclusiveGroup { id: bufferGroup }
|
|
||||||
Repeater {
|
|
||||||
model: [
|
|
||||||
"Off", "Diffuse", "Metallic", "Roughness", "Normal", "Depth",
|
|
||||||
"Lighting", "Shadow", "Pyramid Depth", "Ambient Occlusion", "Custom Shader"
|
|
||||||
]
|
|
||||||
RadioButton {
|
|
||||||
text: qsTr(modelData)
|
|
||||||
exclusiveGroup: bufferGroup
|
|
||||||
checked: index == 0
|
|
||||||
onCheckedChanged: if (checked && index > 0) debug.setDebugMode(index - 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue