mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-30 05:52:10 +02:00
Merge pull request #16131 from samcake/yellow
BUGZ-1114: Fixing Luci issues related to zone not rendering and other minor clean up
This commit is contained in:
commit
ffc6d4a1e2
16 changed files with 284 additions and 491 deletions
|
@ -139,6 +139,11 @@ void Antialiasing::run(const render::RenderContextPointer& renderContext, const
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
void AntialiasingConfig::setAAMode(int mode) {
|
||||||
|
_mode = std::min((int)AntialiasingConfig::MODE_COUNT, std::max(0, mode));
|
||||||
|
emit dirty();
|
||||||
|
}
|
||||||
|
|
||||||
Antialiasing::Antialiasing(bool isSharpenEnabled) :
|
Antialiasing::Antialiasing(bool isSharpenEnabled) :
|
||||||
_isSharpenEnabled{ isSharpenEnabled } {
|
_isSharpenEnabled{ isSharpenEnabled } {
|
||||||
}
|
}
|
||||||
|
@ -189,6 +194,8 @@ const gpu::PipelinePointer& Antialiasing::getDebugBlendPipeline() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Antialiasing::configure(const Config& config) {
|
void Antialiasing::configure(const Config& config) {
|
||||||
|
_mode = (AntialiasingConfig::Mode) config.getAAMode();
|
||||||
|
|
||||||
_sharpen = config.sharpen * 0.25f;
|
_sharpen = config.sharpen * 0.25f;
|
||||||
if (!_isSharpenEnabled) {
|
if (!_isSharpenEnabled) {
|
||||||
_sharpen = 0.0f;
|
_sharpen = 0.0f;
|
||||||
|
@ -298,29 +305,33 @@ void Antialiasing::run(const render::RenderContextPointer& renderContext, const
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void JitterSampleConfig::setIndex(int current) {
|
void JitterSampleConfig::setIndex(int current) {
|
||||||
_index = (current) % JitterSample::SEQUENCE_LENGTH;
|
_index = (current) % JitterSample::SEQUENCE_LENGTH;
|
||||||
emit dirty();
|
emit dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
int JitterSampleConfig::cycleStopPauseRun() {
|
void JitterSampleConfig::setState(int state) {
|
||||||
_state = (_state + 1) % 3;
|
_state = (state) % 3;
|
||||||
switch (_state) {
|
switch (_state) {
|
||||||
case 0: {
|
case 0: {
|
||||||
return none();
|
none();
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 1: {
|
|
||||||
return pause();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
default: {
|
|
||||||
return play();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
case 1: {
|
||||||
|
pause();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
default: {
|
||||||
|
play();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
emit dirty();
|
||||||
|
}
|
||||||
|
|
||||||
|
int JitterSampleConfig::cycleStopPauseRun() {
|
||||||
|
setState((_state + 1) % 3);
|
||||||
return _state;
|
return _state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ class JitterSampleConfig : public render::Job::Config {
|
||||||
Q_PROPERTY(bool freeze MEMBER freeze NOTIFY dirty)
|
Q_PROPERTY(bool freeze MEMBER freeze NOTIFY dirty)
|
||||||
Q_PROPERTY(bool stop MEMBER stop NOTIFY dirty)
|
Q_PROPERTY(bool stop MEMBER stop NOTIFY dirty)
|
||||||
Q_PROPERTY(int index READ getIndex NOTIFY dirty)
|
Q_PROPERTY(int index READ getIndex NOTIFY dirty)
|
||||||
|
Q_PROPERTY(int state READ getState WRITE setState NOTIFY dirty)
|
||||||
public:
|
public:
|
||||||
JitterSampleConfig() : render::Job::Config(true) {}
|
JitterSampleConfig() : render::Job::Config(true) {}
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ public:
|
||||||
bool freeze{ false };
|
bool freeze{ false };
|
||||||
|
|
||||||
void setIndex(int current);
|
void setIndex(int current);
|
||||||
|
void setState(int state);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
int cycleStopPauseRun();
|
int cycleStopPauseRun();
|
||||||
|
@ -86,6 +88,7 @@ private:
|
||||||
|
|
||||||
class AntialiasingConfig : public render::Job::Config {
|
class AntialiasingConfig : public render::Job::Config {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
Q_PROPERTY(int mode READ getAAMode WRITE setAAMode NOTIFY dirty)
|
||||||
Q_PROPERTY(float blend MEMBER blend NOTIFY dirty)
|
Q_PROPERTY(float blend MEMBER blend NOTIFY dirty)
|
||||||
Q_PROPERTY(float sharpen MEMBER sharpen NOTIFY dirty)
|
Q_PROPERTY(float sharpen MEMBER sharpen NOTIFY dirty)
|
||||||
Q_PROPERTY(float covarianceGamma MEMBER covarianceGamma NOTIFY dirty)
|
Q_PROPERTY(float covarianceGamma MEMBER covarianceGamma NOTIFY dirty)
|
||||||
|
@ -106,9 +109,21 @@ class AntialiasingConfig : public render::Job::Config {
|
||||||
public:
|
public:
|
||||||
AntialiasingConfig() : render::Job::Config(true) {}
|
AntialiasingConfig() : render::Job::Config(true) {}
|
||||||
|
|
||||||
|
enum Mode {
|
||||||
|
OFF = 0,
|
||||||
|
TAA,
|
||||||
|
FXAA,
|
||||||
|
MODE_COUNT
|
||||||
|
};
|
||||||
|
|
||||||
|
void setAAMode(int mode);
|
||||||
|
int getAAMode() const { return _mode; }
|
||||||
|
|
||||||
void setDebugFXAA(bool debug) { debugFXAAX = (debug ? 0.0f : 1.0f); emit dirty();}
|
void setDebugFXAA(bool debug) { debugFXAAX = (debug ? 0.0f : 1.0f); emit dirty();}
|
||||||
bool debugFXAA() const { return (debugFXAAX == 0.0f ? true : false); }
|
bool debugFXAA() const { return (debugFXAAX == 0.0f ? true : false); }
|
||||||
|
|
||||||
|
int _mode{ TAA };
|
||||||
|
|
||||||
float blend{ 0.25f };
|
float blend{ 0.25f };
|
||||||
float sharpen{ 0.05f };
|
float sharpen{ 0.05f };
|
||||||
|
|
||||||
|
@ -195,6 +210,7 @@ private:
|
||||||
gpu::PipelinePointer _debugBlendPipeline;
|
gpu::PipelinePointer _debugBlendPipeline;
|
||||||
|
|
||||||
TAAParamsBuffer _params;
|
TAAParamsBuffer _params;
|
||||||
|
AntialiasingConfig::Mode _mode{ AntialiasingConfig::TAA };
|
||||||
float _sharpen{ 0.15f };
|
float _sharpen{ 0.15f };
|
||||||
bool _isSharpenEnabled{ true };
|
bool _isSharpenEnabled{ true };
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,12 +35,13 @@ void BloomThreshold::run(const render::RenderContextPointer& renderContext, cons
|
||||||
const auto frameTransform = inputs.get0();
|
const auto frameTransform = inputs.get0();
|
||||||
const auto inputFrameBuffer = inputs.get1();
|
const auto inputFrameBuffer = inputs.get1();
|
||||||
const auto bloomFrame = inputs.get2();
|
const auto bloomFrame = inputs.get2();
|
||||||
|
const auto lightingModel = inputs.get3();
|
||||||
const auto& bloomStage = renderContext->_scene->getStage<BloomStage>();
|
const auto& bloomStage = renderContext->_scene->getStage<BloomStage>();
|
||||||
graphics::BloomPointer bloom;
|
graphics::BloomPointer bloom;
|
||||||
if (bloomStage && bloomFrame->_blooms.size()) {
|
if (bloomStage && bloomFrame->_blooms.size()) {
|
||||||
bloom = bloomStage->getBloom(bloomFrame->_blooms.front());
|
bloom = bloomStage->getBloom(bloomFrame->_blooms.front());
|
||||||
}
|
}
|
||||||
if (!bloom) {
|
if (!bloom || (lightingModel && !lightingModel->isBloomEnabled())) {
|
||||||
renderContext->taskFlow.abortTask();
|
renderContext->taskFlow.abortTask();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -187,12 +188,17 @@ void BloomDraw::run(const render::RenderContextPointer& renderContext, const Inp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebugBloomConfig::setMode(int mode) {
|
||||||
|
_mode = std::min((int)DebugBloomConfig::MODE_COUNT, std::max(0, mode));
|
||||||
|
emit dirty();
|
||||||
|
}
|
||||||
|
|
||||||
DebugBloom::DebugBloom() {
|
DebugBloom::DebugBloom() {
|
||||||
_params = std::make_shared<gpu::Buffer>(sizeof(glm::vec4), nullptr);
|
_params = std::make_shared<gpu::Buffer>(sizeof(glm::vec4), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugBloom::configure(const Config& config) {
|
void DebugBloom::configure(const Config& config) {
|
||||||
_mode = static_cast<DebugBloomConfig::Mode>(config.mode);
|
_mode = (DebugBloomConfig::Mode) config.getMode();
|
||||||
assert(_mode < DebugBloomConfig::MODE_COUNT);
|
assert(_mode < DebugBloomConfig::MODE_COUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,6 +207,10 @@ void DebugBloom::run(const render::RenderContextPointer& renderContext, const In
|
||||||
assert(renderContext->args->hasViewFrustum());
|
assert(renderContext->args->hasViewFrustum());
|
||||||
RenderArgs* args = renderContext->args;
|
RenderArgs* args = renderContext->args;
|
||||||
|
|
||||||
|
if (_mode == DebugBloomConfig::OFF) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto frameBuffer = inputs.get0();
|
const auto frameBuffer = inputs.get0();
|
||||||
const auto combinedBlurBuffer = inputs.get4();
|
const auto combinedBlurBuffer = inputs.get4();
|
||||||
const auto framebufferSize = frameBuffer->getSize();
|
const auto framebufferSize = frameBuffer->getSize();
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "BloomStage.h"
|
#include "BloomStage.h"
|
||||||
|
|
||||||
#include "DeferredFrameTransform.h"
|
#include "DeferredFrameTransform.h"
|
||||||
|
#include "LightingModel.h"
|
||||||
|
|
||||||
class BloomConfig : public render::Task::Config {
|
class BloomConfig : public render::Task::Config {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -28,7 +29,7 @@ class BloomThresholdConfig : public render::Job::Config {
|
||||||
|
|
||||||
class BloomThreshold {
|
class BloomThreshold {
|
||||||
public:
|
public:
|
||||||
using Inputs = render::VaryingSet3<DeferredFrameTransformPointer, gpu::FramebufferPointer, BloomStage::FramePointer>;
|
using Inputs = render::VaryingSet4<DeferredFrameTransformPointer, gpu::FramebufferPointer, BloomStage::FramePointer, LightingModelPointer>;
|
||||||
using Outputs = render::VaryingSet3<gpu::FramebufferPointer, float, graphics::BloomPointer>;
|
using Outputs = render::VaryingSet3<gpu::FramebufferPointer, float, graphics::BloomPointer>;
|
||||||
using Config = BloomThresholdConfig;
|
using Config = BloomThresholdConfig;
|
||||||
using JobModel = render::Job::ModelIO<BloomThreshold, Inputs, Outputs, Config>;
|
using JobModel = render::Job::ModelIO<BloomThreshold, Inputs, Outputs, Config>;
|
||||||
|
@ -87,12 +88,13 @@ private:
|
||||||
|
|
||||||
class DebugBloomConfig : public render::Job::Config {
|
class DebugBloomConfig : public render::Job::Config {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(int mode MEMBER mode NOTIFY dirty)
|
Q_PROPERTY(int mode READ getMode WRITE setMode NOTIFY dirty)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
enum Mode {
|
enum Mode {
|
||||||
MODE_LEVEL0 = 0,
|
OFF = 0,
|
||||||
|
MODE_LEVEL0,
|
||||||
MODE_LEVEL1,
|
MODE_LEVEL1,
|
||||||
MODE_LEVEL2,
|
MODE_LEVEL2,
|
||||||
MODE_ALL_LEVELS,
|
MODE_ALL_LEVELS,
|
||||||
|
@ -102,7 +104,10 @@ public:
|
||||||
|
|
||||||
DebugBloomConfig() : render::Job::Config(false) {}
|
DebugBloomConfig() : render::Job::Config(false) {}
|
||||||
|
|
||||||
int mode{ MODE_ALL_LEVELS };
|
void setMode(int mode);
|
||||||
|
int getMode() const { return _mode; }
|
||||||
|
|
||||||
|
int _mode{ MODE_ALL_LEVELS };
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void dirty();
|
void dirty();
|
||||||
|
@ -127,14 +132,14 @@ private:
|
||||||
|
|
||||||
class BloomEffect {
|
class BloomEffect {
|
||||||
public:
|
public:
|
||||||
using Inputs = render::VaryingSet3<DeferredFrameTransformPointer, gpu::FramebufferPointer, BloomStage::FramePointer>;
|
using Inputs = render::VaryingSet4<DeferredFrameTransformPointer, gpu::FramebufferPointer, BloomStage::FramePointer, LightingModelPointer>;
|
||||||
using Config = BloomConfig;
|
using Config = BloomConfig;
|
||||||
using JobModel = render::Task::ModelI<BloomEffect, Inputs, Config>;
|
using JobModel = render::Task::ModelI<BloomEffect, Inputs, Config>;
|
||||||
|
|
||||||
BloomEffect();
|
BloomEffect();
|
||||||
|
|
||||||
void configure(const Config& config);
|
void configure(const Config& config);
|
||||||
void build(JobModel& task, const render::Varying& inputs, render::Varying& outputs);
|
void build(JobModel& task, const render::Varying& inputs, render::Varying& outputs);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -150,8 +150,6 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
|
||||||
// Prepare deferred, generate the shared Deferred Frame Transform. Only valid with the scaled frame buffer
|
// Prepare deferred, generate the shared Deferred Frame Transform. Only valid with the scaled frame buffer
|
||||||
const auto deferredFrameTransform = task.addJob<GenerateDeferredFrameTransform>("DeferredFrameTransform", jitter);
|
const auto deferredFrameTransform = task.addJob<GenerateDeferredFrameTransform>("DeferredFrameTransform", jitter);
|
||||||
|
|
||||||
const auto opaqueRangeTimer = task.addJob<BeginGPURangeTimer>("BeginOpaqueRangeTimer", "DrawOpaques");
|
|
||||||
|
|
||||||
const auto prepareDeferredInputs = PrepareDeferred::Inputs(scaledPrimaryFramebuffer, lightingModel).asVarying();
|
const auto prepareDeferredInputs = PrepareDeferred::Inputs(scaledPrimaryFramebuffer, lightingModel).asVarying();
|
||||||
const auto prepareDeferredOutputs = task.addJob<PrepareDeferred>("PrepareDeferred", prepareDeferredInputs);
|
const auto prepareDeferredOutputs = task.addJob<PrepareDeferred>("PrepareDeferred", prepareDeferredInputs);
|
||||||
const auto deferredFramebuffer = prepareDeferredOutputs.getN<PrepareDeferred::Outputs>(0);
|
const auto deferredFramebuffer = prepareDeferredOutputs.getN<PrepareDeferred::Outputs>(0);
|
||||||
|
@ -164,8 +162,6 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
|
||||||
const auto opaqueInputs = DrawStateSortDeferred::Inputs(opaques, lightingModel, jitter).asVarying();
|
const auto opaqueInputs = DrawStateSortDeferred::Inputs(opaques, lightingModel, jitter).asVarying();
|
||||||
task.addJob<DrawStateSortDeferred>("DrawOpaqueDeferred", opaqueInputs, shapePlumber);
|
task.addJob<DrawStateSortDeferred>("DrawOpaqueDeferred", opaqueInputs, shapePlumber);
|
||||||
|
|
||||||
task.addJob<EndGPURangeTimer>("OpaqueRangeTimer", opaqueRangeTimer);
|
|
||||||
|
|
||||||
// Opaque all rendered
|
// Opaque all rendered
|
||||||
|
|
||||||
// Linear Depth Pass
|
// Linear Depth Pass
|
||||||
|
@ -216,13 +212,10 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
|
||||||
const auto transparentsInputs = RenderTransparentDeferred::Inputs(transparents, hazeFrame, lightFrame, lightingModel, lightClusters, shadowFrame, jitter).asVarying();
|
const auto transparentsInputs = RenderTransparentDeferred::Inputs(transparents, hazeFrame, lightFrame, lightingModel, lightClusters, shadowFrame, jitter).asVarying();
|
||||||
task.addJob<RenderTransparentDeferred>("DrawTransparentDeferred", transparentsInputs, shapePlumber);
|
task.addJob<RenderTransparentDeferred>("DrawTransparentDeferred", transparentsInputs, shapePlumber);
|
||||||
|
|
||||||
const auto outlineRangeTimer = task.addJob<BeginGPURangeTimer>("BeginHighlightRangeTimer", "Highlight");
|
// Highlight
|
||||||
|
|
||||||
const auto outlineInputs = DrawHighlightTask::Inputs(items, deferredFramebuffer, lightingFramebuffer, deferredFrameTransform, jitter).asVarying();
|
const auto outlineInputs = DrawHighlightTask::Inputs(items, deferredFramebuffer, lightingFramebuffer, deferredFrameTransform, jitter).asVarying();
|
||||||
task.addJob<DrawHighlightTask>("DrawHighlight", outlineInputs);
|
task.addJob<DrawHighlightTask>("DrawHighlight", outlineInputs);
|
||||||
|
|
||||||
task.addJob<EndGPURangeTimer>("HighlightRangeTimer", outlineRangeTimer);
|
|
||||||
|
|
||||||
// Layered Over (in front)
|
// Layered Over (in front)
|
||||||
const auto inFrontOpaquesInputs = DrawLayered3D::Inputs(inFrontOpaque, lightingModel, hazeFrame, jitter).asVarying();
|
const auto inFrontOpaquesInputs = DrawLayered3D::Inputs(inFrontOpaque, lightingModel, hazeFrame, jitter).asVarying();
|
||||||
const auto inFrontTransparentsInputs = DrawLayered3D::Inputs(inFrontTransparent, lightingModel, hazeFrame, jitter).asVarying();
|
const auto inFrontTransparentsInputs = DrawLayered3D::Inputs(inFrontTransparent, lightingModel, hazeFrame, jitter).asVarying();
|
||||||
|
@ -234,7 +227,7 @@ void RenderDeferredTask::build(JobModel& task, const render::Varying& input, ren
|
||||||
task.addJob<Antialiasing>("Antialiasing", antialiasingInputs);
|
task.addJob<Antialiasing>("Antialiasing", antialiasingInputs);
|
||||||
|
|
||||||
// Add bloom
|
// Add bloom
|
||||||
const auto bloomInputs = BloomEffect::Inputs(deferredFrameTransform, lightingFramebuffer, bloomFrame).asVarying();
|
const auto bloomInputs = BloomEffect::Inputs(deferredFrameTransform, lightingFramebuffer, bloomFrame, lightingModel).asVarying();
|
||||||
task.addJob<BloomEffect>("Bloom", bloomInputs);
|
task.addJob<BloomEffect>("Bloom", bloomInputs);
|
||||||
|
|
||||||
const auto destFramebuffer = static_cast<gpu::FramebufferPointer>(nullptr);
|
const auto destFramebuffer = static_cast<gpu::FramebufferPointer>(nullptr);
|
||||||
|
|
|
@ -1,83 +0,0 @@
|
||||||
//
|
|
||||||
// bloom.qml
|
|
||||||
// developer/utilities/render
|
|
||||||
//
|
|
||||||
// Olivier Prat, created on 09/25/2017.
|
|
||||||
// Copyright 2017 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"
|
|
||||||
|
|
||||||
Item {
|
|
||||||
id: root
|
|
||||||
property var configDebug: Render.getConfig("RenderMainView.DebugBloom")
|
|
||||||
|
|
||||||
Column {
|
|
||||||
spacing: 8
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -10,11 +10,8 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
// Set up the qml ui
|
// Set up the qml ui
|
||||||
var qml = Script.resolvePath('bloom.qml');
|
var window = Desktop.createWindow(Script.resolvePath('./luci/Bloom.qml'), {
|
||||||
var window = new OverlayWindow({
|
title: "Bloom",
|
||||||
title: 'Bloom',
|
presentationMode: Desktop.PresentationMode.NATIVE,
|
||||||
source: qml,
|
size: {x: 285, y: 40}
|
||||||
width: 285,
|
|
||||||
height: 40,
|
|
||||||
});
|
});
|
||||||
window.closed.connect(function() { Script.stop(); });
|
|
|
@ -1,103 +0,0 @@
|
||||||
//
|
|
||||||
// deferredLighting.qml
|
|
||||||
//
|
|
||||||
// Created by Sam Gateau on 6/6/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.7
|
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
|
|
||||||
import stylesUit 1.0
|
|
||||||
import controlsUit 1.0 as HifiControls
|
|
||||||
import "configSlider"
|
|
||||||
import "luci"
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
HifiControls.Label {
|
|
||||||
text: "Shading"
|
|
||||||
}
|
|
||||||
ShadingModel {}
|
|
||||||
|
|
||||||
Separator {}
|
|
||||||
ToneMapping {}
|
|
||||||
|
|
||||||
Separator {}
|
|
||||||
Column {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
spacing: 5
|
|
||||||
Repeater {
|
|
||||||
model: [ "MSAA:PreparePrimaryBufferForward:numSamples:4:1"
|
|
||||||
]
|
|
||||||
ConfigSlider {
|
|
||||||
label: qsTr(modelData.split(":")[0])
|
|
||||||
integral: true
|
|
||||||
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
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Separator {}
|
|
||||||
Framebuffer {}
|
|
||||||
|
|
||||||
Separator {}
|
|
||||||
BoundingBoxes {
|
|
||||||
|
|
||||||
}
|
|
||||||
Separator {}
|
|
||||||
Row {
|
|
||||||
HifiControls.Button {
|
|
||||||
text: "Engine"
|
|
||||||
// activeFocusOnPress: false
|
|
||||||
onClicked: {
|
|
||||||
sendToScript({method: "openEngineView"});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
HifiControls.Button {
|
|
||||||
text: "LOD"
|
|
||||||
// activeFocusOnPress: false
|
|
||||||
onClicked: {
|
|
||||||
sendToScript({method: "openEngineLODView"});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
HifiControls.Button {
|
|
||||||
text: "Cull"
|
|
||||||
// activeFocusOnPress: false
|
|
||||||
onClicked: {
|
|
||||||
sendToScript({method: "openCullInspectorView"});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Row {
|
|
||||||
HifiControls.Button {
|
|
||||||
text: "Material"
|
|
||||||
onClicked: {
|
|
||||||
sendToScript({method: "openMaterialInspectorView"});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,80 +1,84 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
//
|
|
||||||
// Luci.js
|
|
||||||
// tablet-engine app
|
|
||||||
//
|
|
||||||
// Copyright 2017 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 MaterialInspector = Script.require('./materialInspector.js');
|
||||||
|
var Page = Script.require('./luci/Page.js');
|
||||||
|
|
||||||
(function() {
|
|
||||||
var AppUi = Script.require('appUi');
|
|
||||||
|
|
||||||
var MaterialInspector = Script.require('./materialInspector.js');
|
function openView() {
|
||||||
var Page = Script.require('./luci/Page.js');
|
//window.closed.connect(function() { Script.stop(); });
|
||||||
|
|
||||||
var moveDebugCursor = false;
|
|
||||||
var onMousePressEvent = function (e) {
|
|
||||||
if (e.isMiddleButton) {
|
|
||||||
moveDebugCursor = true;
|
|
||||||
setDebugCursor(e.x, e.y);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Controller.mousePressEvent.connect(onMousePressEvent);
|
|
||||||
|
|
||||||
var onMouseReleaseEvent = function () {
|
|
||||||
moveDebugCursor = false;
|
|
||||||
};
|
|
||||||
Controller.mouseReleaseEvent.connect(onMouseReleaseEvent);
|
|
||||||
|
|
||||||
var onMouseMoveEvent = function (e) {
|
|
||||||
if (moveDebugCursor) {
|
|
||||||
setDebugCursor(e.x, e.y);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Controller.mouseMoveEvent.connect(onMouseMoveEvent);
|
|
||||||
|
|
||||||
function setDebugCursor(x, y) {
|
|
||||||
var nx = 2.0 * (x / Window.innerWidth) - 1.0;
|
|
||||||
var ny = 1.0 - 2.0 * ((y) / (Window.innerHeight));
|
|
||||||
|
|
||||||
Render.getConfig("RenderMainView").getConfig("DebugDeferredBuffer").size = { x: nx, y: ny, z: 1.0, w: 1.0 };
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var pages = new Pages();
|
var pages = new Pages();
|
||||||
|
|
||||||
pages.addPage('openEngineLODView', 'Render LOD', '../lod.qml', 300, 400);
|
|
||||||
pages.addPage('openCullInspectorView', 'Cull Inspector', '../luci/Culling.qml', 300, 400);
|
|
||||||
pages.addPage('openMaterialInspectorView', 'Material Inspector', '../materialInspector.qml', 300, 400, MaterialInspector.setWindow);
|
|
||||||
|
|
||||||
function fromQml(message) {
|
function fromQml(message) {
|
||||||
if (pages.open(message.method)) {
|
if (pages.open(message.method)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var ui;
|
var luciWindow
|
||||||
function startup() {
|
function openLuciWindow(window) {
|
||||||
ui = new AppUi({
|
if (luciWindow !== undefined) {
|
||||||
buttonName: "LUCI",
|
activeWindow.fromQml.disconnect(fromQml);
|
||||||
home: Script.resolvePath("deferredLighting.qml"),
|
}
|
||||||
additionalAppScreens : Script.resolvePath("engineInspector.qml"),
|
if (window !== undefined) {
|
||||||
onMessage: fromQml,
|
window.fromQml.connect(fromQml);
|
||||||
normalButton: Script.resolvePath("../../../system/assets/images/luci-i.svg"),
|
}
|
||||||
activeButton: Script.resolvePath("../../../system/assets/images/luci-a.svg")
|
luciWindow = window;
|
||||||
});
|
|
||||||
|
|
||||||
|
var moveDebugCursor = false;
|
||||||
|
var onMousePressEvent = function (e) {
|
||||||
|
if (e.isMiddleButton) {
|
||||||
|
moveDebugCursor = true;
|
||||||
|
setDebugCursor(e.x, e.y);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Controller.mousePressEvent.connect(onMousePressEvent);
|
||||||
|
|
||||||
|
var onMouseReleaseEvent = function () {
|
||||||
|
moveDebugCursor = false;
|
||||||
|
};
|
||||||
|
Controller.mouseReleaseEvent.connect(onMouseReleaseEvent);
|
||||||
|
|
||||||
|
var onMouseMoveEvent = function (e) {
|
||||||
|
if (moveDebugCursor) {
|
||||||
|
setDebugCursor(e.x, e.y);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Controller.mouseMoveEvent.connect(onMouseMoveEvent);
|
||||||
|
|
||||||
|
function setDebugCursor(x, y) {
|
||||||
|
var nx = 2.0 * (x / Window.innerWidth) - 1.0;
|
||||||
|
var ny = 1.0 - 2.0 * ((y) / (Window.innerHeight));
|
||||||
|
|
||||||
|
Render.getConfig("RenderMainView").getConfig("DebugDeferredBuffer").size = { x: nx, y: ny, z: 1.0, w: 1.0 };
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
startup();
|
|
||||||
Script.scriptEnding.connect(function () {
|
function closeLuciWindow() {
|
||||||
|
if (luciWindow !== undefined) {
|
||||||
|
activeWindow.fromQml.disconnect(fromQml);
|
||||||
|
}
|
||||||
|
luciWindow = {};
|
||||||
|
|
||||||
Controller.mousePressEvent.disconnect(onMousePressEvent);
|
Controller.mousePressEvent.disconnect(onMousePressEvent);
|
||||||
Controller.mouseReleaseEvent.disconnect(onMouseReleaseEvent);
|
Controller.mouseReleaseEvent.disconnect(onMouseReleaseEvent);
|
||||||
Controller.mouseMoveEvent.disconnect(onMouseMoveEvent);
|
Controller.mouseMoveEvent.disconnect(onMouseMoveEvent);
|
||||||
pages.clear();
|
pages.clear();
|
||||||
});
|
}
|
||||||
}());
|
|
||||||
|
pages.addPage('Luci', 'Luci', '../luci.qml', 300, 420, openLuciWindow, closeLuciWindow);
|
||||||
|
pages.addPage('openEngineInspectorView', 'Render Engine Inspector', '../engineInspector.qml', 300, 400);
|
||||||
|
pages.addPage('openEngineLODView', 'Render LOD', '../lod.qml', 300, 400);
|
||||||
|
pages.addPage('openMaterialInspectorView', 'Material Inspector', '../materialInspector.qml', 300, 400, MaterialInspector.setWindow, MaterialInspector.setWindow);
|
||||||
|
|
||||||
|
pages.open('Luci');
|
||||||
|
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
openView();
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,12 @@ Rectangle {
|
||||||
Antialiasing {}
|
Antialiasing {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Prop.PropFolderPanel {
|
||||||
|
label: "Bloom"
|
||||||
|
panelFrameData: Component {
|
||||||
|
Bloom {}
|
||||||
|
}
|
||||||
|
}
|
||||||
Prop.PropFolderPanel {
|
Prop.PropFolderPanel {
|
||||||
label: "Culling"
|
label: "Culling"
|
||||||
panelFrameData: Component {
|
panelFrameData: Component {
|
||||||
|
|
|
@ -22,15 +22,12 @@ import "../../lib/prop" as Prop
|
||||||
|
|
||||||
|
|
||||||
Column{
|
Column{
|
||||||
HifiConstants { id: hifi; }
|
id: antialiasing
|
||||||
|
|
||||||
id: antialiasing
|
|
||||||
padding: 10
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
spacing: 10
|
Prop.PropScalar {
|
||||||
Prop.PropScalar {
|
|
||||||
label: "MSAA"
|
label: "MSAA"
|
||||||
object: Render.getConfig("RenderMainView.PreparePrimaryBufferForward")
|
object: Render.getConfig("RenderMainView.PreparePrimaryBufferForward")
|
||||||
property: "numSamples"
|
property: "numSamples"
|
||||||
|
@ -38,49 +35,44 @@ Column{
|
||||||
max: 32
|
max: 32
|
||||||
integral: true
|
integral: true
|
||||||
}
|
}
|
||||||
Row {
|
|
||||||
spacing: 10
|
|
||||||
id: fxaaOnOff
|
|
||||||
property bool debugFXAA: false
|
|
||||||
HifiControls.Button {
|
|
||||||
function getTheText() {
|
|
||||||
if (Render.getConfig("RenderMainView.Antialiasing").fxaaOnOff) {
|
|
||||||
return "FXAA"
|
|
||||||
} else {
|
|
||||||
return "TAA"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
text: getTheText()
|
|
||||||
onClicked: {
|
|
||||||
var onOff = !Render.getConfig("RenderMainView.Antialiasing").fxaaOnOff;
|
|
||||||
if (onOff) {
|
|
||||||
Render.getConfig("RenderMainView.JitterCam").none();
|
|
||||||
Render.getConfig("RenderMainView.Antialiasing").fxaaOnOff = true;
|
|
||||||
} else {
|
|
||||||
Render.getConfig("RenderMainView.JitterCam").play();
|
|
||||||
Render.getConfig("RenderMainView.Antialiasing").fxaaOnOff = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
Prop.PropEnum {
|
||||||
}
|
label: "Deferred AA Method"
|
||||||
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
|
property: "mode"
|
||||||
|
enums: [
|
||||||
|
"Off",
|
||||||
|
"TAA",
|
||||||
|
"FXAA",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Prop.PropEnum {
|
||||||
|
id: jitter
|
||||||
|
label: "Jitter"
|
||||||
|
object: Render.getConfig("RenderMainView.JitterCam")
|
||||||
|
property: "state"
|
||||||
|
enums: [
|
||||||
|
"Off",
|
||||||
|
"On",
|
||||||
|
"Paused",
|
||||||
|
]
|
||||||
}
|
}
|
||||||
Separator {}
|
Separator {}
|
||||||
|
|
||||||
|
Prop.PropScalar {
|
||||||
|
visible: (Render.getConfig("RenderMainView.JitterCam").state == 2)
|
||||||
|
label: "Sample Index"
|
||||||
|
object: Render.getConfig("RenderMainView.JitterCam")
|
||||||
|
property: "index"
|
||||||
|
// min: -1
|
||||||
|
// max: 32
|
||||||
|
readOnly: true
|
||||||
|
integral: true
|
||||||
|
}
|
||||||
Row {
|
Row {
|
||||||
|
visible: (Render.getConfig("RenderMainView.JitterCam").state == 2)
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
|
||||||
HifiControls.Button {
|
|
||||||
text: {
|
|
||||||
var state = 2 - (Render.getConfig("RenderMainView.JitterCam").freeze * 1 - Render.getConfig("RenderMainView.JitterCam").stop * 2);
|
|
||||||
if (state === 2) {
|
|
||||||
return "Jitter"
|
|
||||||
} else if (state === 1) {
|
|
||||||
return "Paused at " + Render.getConfig("RenderMainView.JitterCam").index + ""
|
|
||||||
} else {
|
|
||||||
return "No Jitter"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onClicked: { Render.getConfig("RenderMainView.JitterCam").cycleStopPauseRun(); }
|
|
||||||
}
|
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
text: "<"
|
text: "<"
|
||||||
onClicked: { Render.getConfig("RenderMainView.JitterCam").prev(); }
|
onClicked: { Render.getConfig("RenderMainView.JitterCam").prev(); }
|
||||||
|
@ -91,95 +83,74 @@ Column{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Separator {}
|
Separator {}
|
||||||
HifiControls.CheckBox {
|
Prop.PropBool {
|
||||||
boxSize: 20
|
label: "Constrain color"
|
||||||
text: "Constrain color"
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
checked: Render.getConfig("RenderMainView.Antialiasing")["constrainColor"]
|
property: "constrainColor"
|
||||||
onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["constrainColor"] = checked }
|
|
||||||
}
|
}
|
||||||
ConfigSlider {
|
Prop.PropScalar {
|
||||||
label: qsTr("Covariance gamma")
|
label: "Covariance gamma"
|
||||||
integral: false
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
config: Render.getConfig("RenderMainView.Antialiasing")
|
|
||||||
property: "covarianceGamma"
|
property: "covarianceGamma"
|
||||||
max: 1.5
|
max: 1.5
|
||||||
min: 0.5
|
min: 0.5
|
||||||
height: 38
|
|
||||||
}
|
}
|
||||||
Separator {}
|
Separator {}
|
||||||
HifiControls.CheckBox {
|
Prop.PropBool {
|
||||||
boxSize: 20
|
label: "Feedback history color"
|
||||||
text: "Feedback history color"
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
checked: Render.getConfig("RenderMainView.Antialiasing")["feedbackColor"]
|
property: "feedbackColor"
|
||||||
onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["feedbackColor"] = checked }
|
|
||||||
}
|
}
|
||||||
|
Prop.PropScalar {
|
||||||
ConfigSlider {
|
label: "Source blend"
|
||||||
label: qsTr("Source blend")
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
integral: false
|
|
||||||
config: Render.getConfig("RenderMainView.Antialiasing")
|
|
||||||
property: "blend"
|
property: "blend"
|
||||||
max: 1.0
|
max: 1.0
|
||||||
min: 0.0
|
min: 0.0
|
||||||
height: 38
|
|
||||||
}
|
}
|
||||||
|
Prop.PropScalar {
|
||||||
ConfigSlider {
|
label: "Post sharpen"
|
||||||
label: qsTr("Post sharpen")
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
integral: false
|
|
||||||
config: Render.getConfig("RenderMainView.Antialiasing")
|
|
||||||
property: "sharpen"
|
property: "sharpen"
|
||||||
max: 1.0
|
max: 1.0
|
||||||
min: 0.0
|
min: 0.0
|
||||||
}
|
}
|
||||||
Separator {}
|
Separator {}
|
||||||
Row {
|
Prop.PropBool {
|
||||||
|
label: "Debug"
|
||||||
spacing: 10
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
HifiControls.CheckBox {
|
property: "debug"
|
||||||
boxSize: 20
|
|
||||||
text: "Debug"
|
|
||||||
checked: Render.getConfig("RenderMainView.Antialiasing")["debug"]
|
|
||||||
onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["debug"] = checked }
|
|
||||||
}
|
|
||||||
HifiControls.CheckBox {
|
|
||||||
boxSize: 20
|
|
||||||
text: "Show Debug Cursor"
|
|
||||||
checked: Render.getConfig("RenderMainView.Antialiasing")["showCursorPixel"]
|
|
||||||
onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["showCursorPixel"] = checked }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ConfigSlider {
|
Prop.PropBool {
|
||||||
label: qsTr("Debug Region <")
|
label: "Show Debug Cursor"
|
||||||
integral: false
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
config: Render.getConfig("RenderMainView.Antialiasing")
|
property: "showCursorPixel"
|
||||||
|
}
|
||||||
|
Prop.PropScalar {
|
||||||
|
label: "Debug Region <"
|
||||||
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
property: "debugX"
|
property: "debugX"
|
||||||
max: 1.0
|
max: 1.0
|
||||||
min: 0.0
|
min: 0.0
|
||||||
}
|
}
|
||||||
HifiControls.CheckBox {
|
Prop.PropBool {
|
||||||
boxSize: 20
|
label: "Closest Fragment"
|
||||||
text: "Closest Fragment"
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
checked: Render.getConfig("RenderMainView.Antialiasing")["showClosestFragment"]
|
property: "showClosestFragment"
|
||||||
onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["showClosestFragment"] = checked }
|
|
||||||
}
|
}
|
||||||
ConfigSlider {
|
Prop.PropScalar {
|
||||||
label: qsTr("Debug Velocity Threshold [pix]")
|
label: "Debug Velocity Threshold [pix]"
|
||||||
integral: false
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
config: Render.getConfig("RenderMainView.Antialiasing")
|
|
||||||
property: "debugShowVelocityThreshold"
|
property: "debugShowVelocityThreshold"
|
||||||
max: 50
|
max: 50
|
||||||
min: 0.0
|
min: 0.0
|
||||||
height: 38
|
|
||||||
}
|
}
|
||||||
ConfigSlider {
|
Prop.PropScalar {
|
||||||
label: qsTr("Debug Orb Zoom")
|
label: "Debug Orb Zoom"
|
||||||
integral: false
|
object: Render.getConfig("RenderMainView.Antialiasing")
|
||||||
config: Render.getConfig("RenderMainView.Antialiasing")
|
|
||||||
property: "debugOrbZoom"
|
property: "debugOrbZoom"
|
||||||
max: 32.0
|
max: 32.0
|
||||||
min: 1.0
|
min: 1.0
|
||||||
height: 38
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
48
scripts/developer/utilities/render/luci/Bloom.qml
Normal file
48
scripts/developer/utilities/render/luci/Bloom.qml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
//
|
||||||
|
// bloom.qml
|
||||||
|
//
|
||||||
|
// Olivier Prat, created on 09/25/2017.
|
||||||
|
// Copyright 2017 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.7
|
||||||
|
import "../../lib/prop" as Prop
|
||||||
|
|
||||||
|
Column {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
id: bloom
|
||||||
|
|
||||||
|
property var config: Render.getConfig("RenderMainView.DebugBloom")
|
||||||
|
|
||||||
|
Prop.PropBool {
|
||||||
|
label: "Apply Bloom"
|
||||||
|
object: Render.getConfig("RenderMainView.LightingModel")
|
||||||
|
property: "enableBloom"
|
||||||
|
}
|
||||||
|
|
||||||
|
function setDebugMode(mode) {
|
||||||
|
console.log("Bloom mode is " + mode)
|
||||||
|
bloom.config.enabled = (mode != 0);
|
||||||
|
bloom.config.mode = mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
Prop.PropEnum {
|
||||||
|
label: "Debug Bloom Buffer"
|
||||||
|
// object: config
|
||||||
|
// property: "mode"
|
||||||
|
enums: [
|
||||||
|
"Off",
|
||||||
|
"Lvl 0",
|
||||||
|
"Lvl 1",
|
||||||
|
"Lvl 2",
|
||||||
|
"All",
|
||||||
|
]
|
||||||
|
|
||||||
|
valueVarSetter: function (mode) { bloom.setDebugMode(mode) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ Column {
|
||||||
Prop.PropCheckBox {
|
Prop.PropCheckBox {
|
||||||
text: "Zones"
|
text: "Zones"
|
||||||
checked: root.mainViewTask.getConfig("DrawZones")["enabled"]
|
checked: root.mainViewTask.getConfig("DrawZones")["enabled"]
|
||||||
onCheckedChanged: { root.mainViewTask.getConfig("ZoneRenderer")["enabled"] = checked; root.mainViewTask.getConfig("DrawZones")["enabled"] = checked; }
|
onCheckedChanged: { root.mainViewTask.getConfig("DrawZones")["enabled"] = checked; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Column {
|
Column {
|
||||||
|
|
|
@ -36,6 +36,7 @@ Column {
|
||||||
"Lightmap:LightingModel:enableLightmap",
|
"Lightmap:LightingModel:enableLightmap",
|
||||||
"Background:LightingModel:enableBackground",
|
"Background:LightingModel:enableBackground",
|
||||||
"Haze:LightingModel:enableHaze",
|
"Haze:LightingModel:enableHaze",
|
||||||
|
"Bloom:LightingModel:enableBloom",
|
||||||
"AO:LightingModel:enableAmbientOcclusion",
|
"AO:LightingModel:enableAmbientOcclusion",
|
||||||
"Textures:LightingModel:enableMaterialTexturing"
|
"Textures:LightingModel:enableMaterialTexturing"
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,6 +5,7 @@ BoundingBoxes 1.0 BoundingBoxes.qml
|
||||||
Framebuffer 1.0 Framebuffer.qml
|
Framebuffer 1.0 Framebuffer.qml
|
||||||
Antialiasing 1.0 Antialiasing.qml
|
Antialiasing 1.0 Antialiasing.qml
|
||||||
Culling 1.0 Culling.qml
|
Culling 1.0 Culling.qml
|
||||||
|
Bloom 1.0 Bloom.qml
|
||||||
|
|
||||||
Platform 1.0 Platform.qml
|
Platform 1.0 Platform.qml
|
||||||
RenderSettings 1.0 RenderSettings.qml
|
RenderSettings 1.0 RenderSettings.qml
|
||||||
|
|
|
@ -1,84 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
var MaterialInspector = Script.require('./materialInspector.js');
|
|
||||||
var Page = Script.require('./luci/Page.js');
|
|
||||||
|
|
||||||
|
|
||||||
function openView() {
|
|
||||||
//window.closed.connect(function() { Script.stop(); });
|
|
||||||
|
|
||||||
|
|
||||||
var pages = new Pages();
|
|
||||||
function fromQml(message) {
|
|
||||||
if (pages.open(message.method)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var luciWindow
|
|
||||||
function openLuciWindow(window) {
|
|
||||||
if (luciWindow !== undefined) {
|
|
||||||
activeWindow.fromQml.disconnect(fromQml);
|
|
||||||
}
|
|
||||||
if (window !== undefined) {
|
|
||||||
window.fromQml.connect(fromQml);
|
|
||||||
}
|
|
||||||
luciWindow = window;
|
|
||||||
|
|
||||||
|
|
||||||
var moveDebugCursor = false;
|
|
||||||
var onMousePressEvent = function (e) {
|
|
||||||
if (e.isMiddleButton) {
|
|
||||||
moveDebugCursor = true;
|
|
||||||
setDebugCursor(e.x, e.y);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Controller.mousePressEvent.connect(onMousePressEvent);
|
|
||||||
|
|
||||||
var onMouseReleaseEvent = function () {
|
|
||||||
moveDebugCursor = false;
|
|
||||||
};
|
|
||||||
Controller.mouseReleaseEvent.connect(onMouseReleaseEvent);
|
|
||||||
|
|
||||||
var onMouseMoveEvent = function (e) {
|
|
||||||
if (moveDebugCursor) {
|
|
||||||
setDebugCursor(e.x, e.y);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Controller.mouseMoveEvent.connect(onMouseMoveEvent);
|
|
||||||
|
|
||||||
function setDebugCursor(x, y) {
|
|
||||||
var nx = 2.0 * (x / Window.innerWidth) - 1.0;
|
|
||||||
var ny = 1.0 - 2.0 * ((y) / (Window.innerHeight));
|
|
||||||
|
|
||||||
Render.getConfig("RenderMainView").getConfig("DebugDeferredBuffer").size = { x: nx, y: ny, z: 1.0, w: 1.0 };
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeLuciWindow() {
|
|
||||||
if (luciWindow !== undefined) {
|
|
||||||
activeWindow.fromQml.disconnect(fromQml);
|
|
||||||
}
|
|
||||||
luciWindow = {};
|
|
||||||
|
|
||||||
Controller.mousePressEvent.disconnect(onMousePressEvent);
|
|
||||||
Controller.mouseReleaseEvent.disconnect(onMouseReleaseEvent);
|
|
||||||
Controller.mouseMoveEvent.disconnect(onMouseMoveEvent);
|
|
||||||
pages.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
pages.addPage('Luci', 'Luci', '../luci.qml', 300, 420, openLuciWindow, closeLuciWindow);
|
|
||||||
pages.addPage('openEngineInspectorView', 'Render Engine Inspector', '../engineInspector.qml', 300, 400);
|
|
||||||
pages.addPage('openEngineLODView', 'Render LOD', '../lod.qml', 300, 400);
|
|
||||||
pages.addPage('openMaterialInspectorView', 'Material Inspector', '../materialInspector.qml', 300, 400, MaterialInspector.setWindow, MaterialInspector.setWindow);
|
|
||||||
|
|
||||||
pages.open('Luci');
|
|
||||||
|
|
||||||
|
|
||||||
return pages;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
openView();
|
|
||||||
|
|
Loading…
Reference in a new issue