Exemple #1
0
        public PostEffect previousEffect(PostEffect currentEffect)
        {
            int i = currentEffect.index;

            if (i > 0)
            {
                return(myEffects[i - 1]);
            }

            return(null);
        }
Exemple #2
0
        public static PostEffect create(String name)
        {
            EffectCreator creator;

            if (EffectFactory.TryGetValue(name, out creator) == true)
            {
                PostEffect ret = creator();
                return(ret);
            }

            return(null);
        }
        public Texture previousEffectOutput(PostEffect currentEffect)
        {
            for (int i = 0; i < myEffects.Count; i++)
            {
                if (myEffects[i] == currentEffect)
                {
                    if (i > 0)
                    {
                        return(myEffects[i - 1].output);
                    }
                }
            }

            return(sourceColorBuffer());
        }
        public PostEffect previousEffect(PostEffect currentEffect)
        {
            for (int i = 0; i < myEffects.Count; i++)
            {
                if (myEffects[i] == currentEffect)
                {
                    if (i > 0)
                    {
                        return(myEffects[i - 1]);
                    }
                }
            }

            return(null);
        }
Exemple #5
0
        public Texture previousEffectOutput(PostEffect currentEffect)
        {
            PostEffect effect = previousEffect(currentEffect);

            while (effect != null)
            {
                if (effect.enabled == true)
                {
                    return(effect.output);
                }

                effect = previousEffect(effect);
            }

            return(sourceColorBuffer());
        }
        public void addEffect(String name)
        {
            if (hasEffect(name) == true)
            {
                Warn.print("Effect {0} already in pipeline", name);
                return;
            }

            PostEffect effect = PostProcessingFactory.create(name);

            if (effect == null)
            {
                Warn.print("Error creating effect {0}", name);
                return;
            }

            effect.postPass = this;
            myEffects.Add(effect);
        }