X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.cpp;h=39055649a4135c11e47e1b80c0284e598a7948c3;hp=4a333ea7c94ea32af0f86e7194c0631427d4be52;hb=974b5c837c24179f9ab29f4ffdcdd1172288172b;hpb=15b0642fb679aabc45e6ef778d99494152f233b2 diff --git a/effect_chain.cpp b/effect_chain.cpp index 4a333ea..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; }