From 184d275e9a732c8f2da2e0cada100fa6ef8ee25c Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Thu, 21 Mar 2019 18:01:52 +1100 Subject: [PATCH] moved associated function after linearize --- rendering/renderfunctions.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/rendering/renderfunctions.cpp b/rendering/renderfunctions.cpp index 4d5a78d0b..fc6c242d1 100644 --- a/rendering/renderfunctions.cpp +++ b/rendering/renderfunctions.cpp @@ -316,6 +316,7 @@ GLuint olive::rendering::compose_sequence(ComposeSequenceParams ¶ms) { long playhead = s->playhead; if (!params.nests.isEmpty()) { + for (int i=0;imedia()->to_sequence().get(); playhead += params.nests.at(i)->clip_in(true) - params.nests.at(i)->timeline_in(true); @@ -327,6 +328,7 @@ GLuint olive::rendering::compose_sequence(ComposeSequenceParams ¶ms) { params.ctx->functions()->glClear(GL_COLOR_BUFFER_BIT); final_fbo = params.nests.last()->fbo.at(0).buffer(); } + } int audio_track_count = 0; @@ -516,19 +518,6 @@ GLuint olive::rendering::compose_sequence(ComposeSequenceParams ¶ms) { } else if (c->media()->get_type() == MEDIA_TYPE_FOOTAGE) { - if (!c->media()->to_footage()->alpha_is_associated) { - - // alpha is not premultiplied, we'll need to multiply it for the rest of the pipeline - params.ctx->functions()->glBlendFuncSeparate(GL_SRC_ALPHA, GL_ZERO, GL_ONE, GL_ZERO); - - textureID = draw_clip(params.ctx, params.pipeline, c->fbo.at(fbo_switcher), textureID, true); - - params.ctx->functions()->glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); - - fbo_switcher = !fbo_switcher; - - } - #ifndef NO_OCIO // Convert texture to float @@ -589,6 +578,19 @@ GLuint olive::rendering::compose_sequence(ComposeSequenceParams ¶ms) { } #endif + if (!c->media()->to_footage()->alpha_is_associated) { + + // alpha is not premultiplied, we'll need to multiply it for the rest of the pipeline + params.ctx->functions()->glBlendFuncSeparate(GL_SRC_ALPHA, GL_ZERO, GL_ONE, GL_ZERO); + + textureID = draw_clip(params.ctx, params.pipeline, c->fbo.at(fbo_switcher), textureID, true); + + params.ctx->functions()->glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + + fbo_switcher = !fbo_switcher; + + } + } }