mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:22:54 +02:00
Exloring the why....
This commit is contained in:
parent
fe08609b0c
commit
a96ef7b5f0
3 changed files with 29 additions and 11 deletions
|
@ -52,24 +52,25 @@ void PolyLineEntityRenderer::buildPipelines() {
|
||||||
gpu::ShaderPointer program = gpu::Shader::createProgram(key.first == render::Args::DEFERRED ? shader::entities_renderer::program::paintStroke : shader::entities_renderer::program::paintStroke_forward);
|
gpu::ShaderPointer program = gpu::Shader::createProgram(key.first == render::Args::DEFERRED ? shader::entities_renderer::program::paintStroke : shader::entities_renderer::program::paintStroke_forward);
|
||||||
|
|
||||||
gpu::StatePointer state = gpu::StatePointer(new gpu::State());
|
gpu::StatePointer state = gpu::StatePointer(new gpu::State());
|
||||||
|
|
||||||
state->setCullMode(gpu::State::CullMode::CULL_NONE);
|
state->setCullMode(gpu::State::CullMode::CULL_NONE);
|
||||||
state->setDepthTest(true, !key.second, gpu::LESS_EQUAL);
|
state->setDepthTest(true, !key.second, gpu::LESS_EQUAL);
|
||||||
PrepareStencil::testMask(*state);
|
PrepareStencil::testMaskDrawShape(*state);
|
||||||
state->setBlendFunction(true,
|
|
||||||
gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA,
|
state->setBlendFunction(true, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA);
|
||||||
gpu::State::FACTOR_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::ONE);
|
|
||||||
_pipelines[key] = gpu::Pipeline::create(program, state);
|
_pipelines[key] = gpu::Pipeline::create(program, state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemKey PolyLineEntityRenderer::getKey() {
|
ItemKey PolyLineEntityRenderer::getKey() {
|
||||||
// return ItemKey::Builder::transparentShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer());
|
return ItemKey::Builder::transparentShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer());
|
||||||
return ItemKey::Builder::opaqueShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer());
|
// return ItemKey::Builder::opaqueShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
ShapeKey PolyLineEntityRenderer::getShapeKey() {
|
ShapeKey PolyLineEntityRenderer::getShapeKey() {
|
||||||
// auto builder = ShapeKey::Builder().withOwnPipeline().withTranslucent().withoutCullFace();
|
auto builder = ShapeKey::Builder().withOwnPipeline().withTranslucent().withoutCullFace();
|
||||||
auto builder = ShapeKey::Builder().withOwnPipeline().withoutCullFace();
|
//auto builder = ShapeKey::Builder().withOwnPipeline().withoutCullFace();
|
||||||
if (_primitiveMode == PrimitiveMode::LINES) {
|
if (_primitiveMode == PrimitiveMode::LINES) {
|
||||||
builder.withWireframe();
|
builder.withWireframe();
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,14 @@ Rectangle {
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
Prop.PropFolderPanel {
|
||||||
|
label: "Render Settings"
|
||||||
|
isUnfold: false
|
||||||
|
panelFrameData: Component {
|
||||||
|
RenderSettings {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Prop.PropFolderPanel {
|
Prop.PropFolderPanel {
|
||||||
label: "Shading Model"
|
label: "Shading Model"
|
||||||
panelFrameData: Component {
|
panelFrameData: Component {
|
||||||
|
@ -69,7 +77,7 @@ Rectangle {
|
||||||
Culling {}
|
Culling {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Prop.PropFolderPanel {
|
Prop.PropFolderPanel {
|
||||||
label: "Tools"
|
label: "Tools"
|
||||||
panelFrameData: Component {
|
panelFrameData: Component {
|
||||||
Row {
|
Row {
|
||||||
|
@ -87,7 +95,7 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
/* Jet.TaskPropView {
|
/* Jet.TaskPropView {
|
||||||
id: "le"
|
id: "le"
|
||||||
jobPath: ""
|
jobPath: ""
|
||||||
|
|
|
@ -18,6 +18,8 @@ import controlsUit 1.0 as HifiControls
|
||||||
import "../configSlider"
|
import "../configSlider"
|
||||||
import "../../lib/plotperf"
|
import "../../lib/plotperf"
|
||||||
|
|
||||||
|
import "../../lib/prop" as Prop
|
||||||
|
|
||||||
|
|
||||||
Column{
|
Column{
|
||||||
HifiConstants { id: hifi; }
|
HifiConstants { id: hifi; }
|
||||||
|
@ -28,7 +30,14 @@ Column{
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
Prop.PropScalar {
|
||||||
|
label: "MSAA"
|
||||||
|
object: Render.getConfig("RenderMainView.PreparePrimaryBufferForward")
|
||||||
|
property: "numSamples"
|
||||||
|
min: 1
|
||||||
|
max: 4
|
||||||
|
integral: true
|
||||||
|
}
|
||||||
Row {
|
Row {
|
||||||
spacing: 10
|
spacing: 10
|
||||||
id: fxaaOnOff
|
id: fxaaOnOff
|
||||||
|
|
Loading…
Reference in a new issue