mirror of
https://github.com/lubosz/overte.git
synced 2025-04-14 09:06:16 +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::StatePointer state = gpu::StatePointer(new gpu::State());
|
||||
|
||||
state->setCullMode(gpu::State::CullMode::CULL_NONE);
|
||||
state->setDepthTest(true, !key.second, gpu::LESS_EQUAL);
|
||||
PrepareStencil::testMask(*state);
|
||||
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);
|
||||
PrepareStencil::testMaskDrawShape(*state);
|
||||
|
||||
state->setBlendFunction(true, gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA);
|
||||
|
||||
_pipelines[key] = gpu::Pipeline::create(program, state);
|
||||
}
|
||||
}
|
||||
|
||||
ItemKey PolyLineEntityRenderer::getKey() {
|
||||
// return ItemKey::Builder::transparentShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer());
|
||||
return ItemKey::Builder::opaqueShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer());
|
||||
return ItemKey::Builder::transparentShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer());
|
||||
// return ItemKey::Builder::opaqueShape().withTypeMeta().withTagBits(getTagMask()).withLayer(getHifiRenderLayer());
|
||||
}
|
||||
|
||||
ShapeKey PolyLineEntityRenderer::getShapeKey() {
|
||||
// auto builder = ShapeKey::Builder().withOwnPipeline().withTranslucent().withoutCullFace();
|
||||
auto builder = ShapeKey::Builder().withOwnPipeline().withoutCullFace();
|
||||
auto builder = ShapeKey::Builder().withOwnPipeline().withTranslucent().withoutCullFace();
|
||||
//auto builder = ShapeKey::Builder().withOwnPipeline().withoutCullFace();
|
||||
if (_primitiveMode == PrimitiveMode::LINES) {
|
||||
builder.withWireframe();
|
||||
}
|
||||
|
|
|
@ -33,6 +33,14 @@ Rectangle {
|
|||
|
||||
Column {
|
||||
width: parent.width
|
||||
Prop.PropFolderPanel {
|
||||
label: "Render Settings"
|
||||
isUnfold: false
|
||||
panelFrameData: Component {
|
||||
RenderSettings {
|
||||
}
|
||||
}
|
||||
}
|
||||
Prop.PropFolderPanel {
|
||||
label: "Shading Model"
|
||||
panelFrameData: Component {
|
||||
|
@ -69,7 +77,7 @@ Rectangle {
|
|||
Culling {}
|
||||
}
|
||||
}
|
||||
/* Prop.PropFolderPanel {
|
||||
Prop.PropFolderPanel {
|
||||
label: "Tools"
|
||||
panelFrameData: Component {
|
||||
Row {
|
||||
|
@ -87,7 +95,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
/* Jet.TaskPropView {
|
||||
id: "le"
|
||||
jobPath: ""
|
||||
|
|
|
@ -18,6 +18,8 @@ import controlsUit 1.0 as HifiControls
|
|||
import "../configSlider"
|
||||
import "../../lib/plotperf"
|
||||
|
||||
import "../../lib/prop" as Prop
|
||||
|
||||
|
||||
Column{
|
||||
HifiConstants { id: hifi; }
|
||||
|
@ -28,7 +30,14 @@ Column{
|
|||
anchors.right: parent.right
|
||||
|
||||
spacing: 10
|
||||
|
||||
Prop.PropScalar {
|
||||
label: "MSAA"
|
||||
object: Render.getConfig("RenderMainView.PreparePrimaryBufferForward")
|
||||
property: "numSamples"
|
||||
min: 1
|
||||
max: 4
|
||||
integral: true
|
||||
}
|
||||
Row {
|
||||
spacing: 10
|
||||
id: fxaaOnOff
|
||||
|
|
Loading…
Reference in a new issue