-Effect *instantiate_effect(EffectId effect)
-{
- switch (effect) {
- case EFFECT_GAMMA_EXPANSION:
- return new GammaExpansionEffect();
- case EFFECT_GAMMA_COMPRESSION:
- return new GammaCompressionEffect();
- case EFFECT_COLOR_SPACE_CONVERSION:
- return new ColorSpaceConversionEffect();
- case EFFECT_SANDBOX:
- return new SandboxEffect();
- case EFFECT_LIFT_GAMMA_GAIN:
- return new LiftGammaGainEffect();
- case EFFECT_SATURATION:
- return new SaturationEffect();
- case EFFECT_MIRROR:
- return new MirrorEffect();
- case EFFECT_VIGNETTE:
- return new VignetteEffect();
- case EFFECT_BLUR:
- return new BlurEffect();
- case EFFECT_DIFFUSION:
- return new DiffusionEffect();
- case EFFECT_GLOW:
- return new GlowEffect();
- case EFFECT_MIX:
- return new MixEffect();
- }
- assert(false);
-}
-
-// Set the "use_srgb_texture_format" option on all inputs that feed into this node,
-// and update the output_gamma_curve[] map as we go.
-//
-// NOTE: We assume that the only way we could actually get GAMMA_sRGB from an
-// effect (except from GammaCompressionCurve, which should never be inserted
-// into a chain when this is called) is by pass-through from a texture.
-// Thus, we can simply feed the flag up towards all inputs.
-void EffectChain::set_use_srgb_texture_format(Effect *effect)
+void EffectChain::find_all_nonlinear_inputs(Effect *effect,
+ std::vector<Input *> *nonlinear_inputs,
+ std::vector<Effect *> *intermediates)