Exloring the why....

This commit is contained in:
Sam Gateau 2019-08-09 18:34:36 -07:00
parent fe08609b0c
commit a96ef7b5f0
3 changed files with 29 additions and 11 deletions

View file

@ -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();
}

View file

@ -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: ""

View file

@ -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