如何在Android中对GLSurfaceView应用多重效果?

时间:2017-08-10 06:13:19

标签: android opengl-es effects glsurfaceview

这是我的代码,工作正常

        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_BLACKWHITE);
        mEffect.setParameter("black", .9f);
        mEffect.setParameter("white", .5f);
        break;

但现在我想要两个效果,怎么做?

        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_BLACKWHITE);
        mEffect.setParameter("brightness", 2.0f);

我想用"灰度图像"

来制作这两种效果
        mEffect = effectFactory.createEffect(EffectFactory.EFFECT_GRAYSCALE);