X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.cpp;h=cfc6d06431f46631302b22f9d7693bcf79dab15b;hp=4eda18d7afc166eddb0f126f921b3a98ce215d3e;hb=89da3437c862c15acb870fbe3175b9e4a0a8244a;hpb=048e90293b5f5ed4b922d60c4cb47c4b5d24b85e diff --git a/effect_chain.cpp b/effect_chain.cpp index 4eda18d..cfc6d06 100644 --- a/effect_chain.cpp +++ b/effect_chain.cpp @@ -795,7 +795,7 @@ void EffectChain::fix_internal_gamma_by_inserting_nodes(unsigned step) continue; } Node *conversion = add_node(new GammaExpansionEffect()); - conversion->effect->set_int("destination_curve", GAMMA_LINEAR); + conversion->effect->set_int("source_curve", input->output_gamma_curve); conversion->output_gamma_curve = GAMMA_LINEAR; insert_node_between(input, conversion, node); } @@ -918,6 +918,7 @@ void EffectChain::finalize() output_node->output_texture_width = phases[i]->output_width; output_node->output_texture_height = phases[i]->output_height; } + inform_input_sizes(phases.back()); } for (unsigned i = 0; i < inputs.size(); ++i) { @@ -962,8 +963,8 @@ void EffectChain::render_to_screen() for (unsigned phase = 0; phase < phases.size(); ++phase) { // See if the requested output size has changed. If so, we need to recreate // the texture (and before we start setting up inputs). + inform_input_sizes(phases[phase]); if (phase != phases.size() - 1) { - inform_input_sizes(phases[phase]); find_output_size(phases[phase]); Node *output_node = phases[phase]->effects.back();