mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 13:43:49 +02:00
Debug Draw rendering now is visible on background skybox
This commit is contained in:
parent
2cae294ab4
commit
2136134ed0
1 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
|||
#include "AbstractViewStateInterface.h"
|
||||
#include "RenderUtilsLogging.h"
|
||||
#include "DebugDraw.h"
|
||||
#include "StencilMaskPass.h"
|
||||
|
||||
#include "animdebugdraw_vert.h"
|
||||
#include "animdebugdraw_frag.h"
|
||||
|
@ -70,7 +71,7 @@ public:
|
|||
typedef render::Payload<AnimDebugDrawData> AnimDebugDrawPayload;
|
||||
|
||||
namespace render {
|
||||
template <> const ItemKey payloadGetKey(const AnimDebugDrawData::Pointer& data) { return (data->_isVisible ? ItemKey::Builder::opaqueShape() : ItemKey::Builder::opaqueShape().withInvisible()).withTagBits(ItemKey::TAG_BITS_ALL); }
|
||||
template <> const ItemKey payloadGetKey(const AnimDebugDrawData::Pointer& data) { return (data->_isVisible ? ItemKey::Builder::transparentShape() : ItemKey::Builder::transparentShape().withInvisible()).withTagBits(ItemKey::TAG_BITS_ALL); }
|
||||
template <> const Item::Bound payloadGetBound(const AnimDebugDrawData::Pointer& data) { return data->_bound; }
|
||||
template <> void payloadRender(const AnimDebugDrawData::Pointer& data, RenderArgs* args) {
|
||||
data->render(args);
|
||||
|
@ -104,6 +105,7 @@ AnimDebugDraw::AnimDebugDraw() :
|
|||
state->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);
|
||||
PrepareStencil::testMaskDrawShape(*state.get());
|
||||
auto vertShader = animdebugdraw_vert::getShader();
|
||||
auto fragShader = animdebugdraw_frag::getShader();
|
||||
auto program = gpu::Shader::createProgram(vertShader, fragShader);
|
||||
|
|
Loading…
Reference in a new issue