X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.cpp;h=39055649a4135c11e47e1b80c0284e598a7948c3;hp=b6b5f59925df18b83ea75100e276e6d153076310;hb=974b5c837c24179f9ab29f4ffdcdd1172288172b;hpb=236a0ad8b604d5b3bff53f40b600991168f76800 diff --git a/effect_chain.cpp b/effect_chain.cpp index b6b5f59..3905564 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -184,6 +184,13 @@ GLenum EffectChain::get_input_sampler(Node *node, unsigned input_num) const return GL_TEXTURE0 + node->incoming_links[input_num]->bound_sampler_num; } +GLenum EffectChain::has_input_sampler(Node *node, unsigned input_num) const +{ + assert(input_num < node->incoming_links.size()); + return node->incoming_links[input_num]->bound_sampler_num >= 0 && + node->incoming_links[input_num]->bound_sampler_num < 8; +} + void EffectChain::find_all_nonlinear_inputs(Node *node, vector *nonlinear_inputs) { if (node->output_gamma_curve == GAMMA_LINEAR && @@ -500,7 +507,8 @@ Phase *EffectChain::construct_phase(Node *output, map *complete bool start_new_phase = false; if (node->effect->needs_texture_bounce() && - !deps[i]->effect->is_single_texture()) { + !deps[i]->effect->is_single_texture() && + !deps[i]->effect->override_disable_bounce()) { start_new_phase = true; } @@ -1648,7 +1656,9 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height // This needs to be set anew, in case we are coming from a different context // from when we initialized. + check_error(); glDisable(GL_DITHER); + check_error(); // Save original viewport. GLuint x = 0, y = 0; @@ -1663,6 +1673,7 @@ void EffectChain::render_to_fbo(GLuint dest_fbo, unsigned width, unsigned height } // Basic state. + check_error(); glDisable(GL_BLEND); check_error(); glDisable(GL_DEPTH_TEST);