Exemplo n.º 1
0
        public PostEffect previousEffect(PostEffect currentEffect)
        {
            int i = currentEffect.index;

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

            return(null);
        }
Exemplo n.º 2
0
        public static PostEffect create(String name)
        {
            EffectCreator creator;

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

            return(null);
        }
Exemplo n.º 3
0
        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());
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 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());
        }
Exemplo n.º 6
0
        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);
        }