mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 17:53:32 +02:00
Disabled stereo in batch when using full screen outline
This commit is contained in:
parent
4cbee72eae
commit
3a977f6039
1 changed files with 6 additions and 0 deletions
|
@ -278,6 +278,9 @@ void DrawOutline::run(const render::RenderContextPointer& renderContext, const I
|
|||
auto outlineFrameBuffer = inputs.get1();
|
||||
auto outlineRect = inputs.get3();
|
||||
|
||||
// TODO : If scissor isn't possible in stereo, send the AABox in the shader
|
||||
// and do a raycasting per pixel to determine if we need to do the outline
|
||||
// This should improve performance.
|
||||
if (outlineFrameBuffer && outlineRect.z>0 && outlineRect.w>0) {
|
||||
auto sceneDepthBuffer = inputs.get2();
|
||||
const auto frameTransform = inputs.get0();
|
||||
|
@ -299,6 +302,9 @@ void DrawOutline::run(const render::RenderContextPointer& renderContext, const I
|
|||
}
|
||||
|
||||
gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
|
||||
#if !OUTLINE_USE_SCISSOR
|
||||
batch.enableStereo(false);
|
||||
#endif
|
||||
batch.setFramebuffer(destinationFrameBuffer);
|
||||
|
||||
batch.setViewportTransform(args->_viewport);
|
||||
|
|
Loading…
Reference in a new issue