From 4297cd92d6ff99b34e13c08056813b7a9bcaf3a5 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sun, 15 Dec 2019 02:37:38 +1100 Subject: [PATCH] fixed issue with accelerated node iterations Uniform values cannot be set if the shader is not bound, and calling Blit would release the shader making subsequent iteration count updates not work. This commit makes sure the shader is bound before trying to do so. --- app/render/backend/opengl/openglworker.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/render/backend/opengl/openglworker.cpp b/app/render/backend/opengl/openglworker.cpp index 357177858..5d74d6c68 100644 --- a/app/render/backend/opengl/openglworker.cpp +++ b/app/render/backend/opengl/openglworker.cpp @@ -311,9 +311,12 @@ void OpenGLWorker::RunNodeAccelerated(const Node *node, const TimeRange &range, // Some nodes use multiple iterations for optimization OpenGLTextureCache::ReferencePtr output_tex; + for (int iteration=0;iterationAcceleratedCodeIterations();iteration++) { // Set iteration number + shader->bind(); shader->setUniformValue("ove_iteration", iteration); + shader->release(); // If this is not the first iteration, set the parameter that will receive the last iteration's texture OpenGLTextureCache::ReferencePtr source_tex = dst_refs.at((iteration+1)%dst_refs.size());