enable backface culling on procedurals

This commit is contained in:
SamGondelman 2019-02-06 10:55:36 -08:00
parent 3ee412faf7
commit 4c9fb168c7

View file

@ -104,13 +104,13 @@ void ProceduralData::parse(const QJsonObject& proceduralData) {
//}
Procedural::Procedural() {
_opaqueState->setCullMode(gpu::State::CULL_BACK);
_opaqueState->setCullMode(gpu::State::CULL_NONE);
_opaqueState->setDepthTest(true, true, gpu::LESS_EQUAL);
_opaqueState->setBlendFunction(false,
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);
_transparentState->setCullMode(gpu::State::CULL_BACK);
_transparentState->setCullMode(gpu::State::CULL_NONE);
_transparentState->setDepthTest(true, true, gpu::LESS_EQUAL);
_transparentState->setBlendFunction(true,
gpu::State::SRC_ALPHA, gpu::State::BLEND_OP_ADD, gpu::State::INV_SRC_ALPHA,