- // This should currently only happen for effects that are phase outputs,
- // and we throw those out separately below.
+ // This should currently only happen for effects that are inputs
+ // (either true inputs or phase outputs). We special-case inputs,
+ // and then deduplicate phase outputs in compile_glsl_program().
+ if (node->effect->num_inputs() == 0 && completed_effects.count(node)) {
+ continue;
+ }