/// <summary> /// Function to add an effect, and an optional rendering action to the compositor queue. /// </summary> /// <param name="name">A name for the pass.</param> /// <param name="effect">The effect to add as a pass.</param> /// <returns>The fluent interface for the effects processor.</returns> /// <exception cref="ArgumentNullException">Thrown when the <paramref name="name"/>, or the <paramref name="effect"/> parameter is <b>null</b>.</exception> /// <exception cref="ArgumentEmptyException">Thrown when the <paramref name="name"/> parameter is empty.</exception> public Gorgon2DCompositor EffectPass(string name, Gorgon2DEffect effect) { if (effect == null) { throw new ArgumentNullException(nameof(effect)); } return(Pass(new Gorgon2DCompositionPass(name, effect))); }
/// <summary> /// Initializes a new instance of the <see cref="Gorgon2DCompositionPass"/> class. /// </summary> /// <param name="name">The name of this object.</param> /// <param name="effect">[Optional] The effect to apply to the pass.</param> /// <exception cref="ArgumentNullException">Thrown when the <paramref name="name"/>, or the <paramref name="effect"/> parameter is <b>null</b>.</exception> /// <exception cref="ArgumentEmptyException">Thrown when the <paramref name="name"/> parameter is empty.</exception> public Gorgon2DCompositionPass(string name, Gorgon2DEffect effect = null) : base(name) => Effect = effect;