GPUImageScreenBlendFilter如何工作?

时间:2017-03-17 10:21:29

标签: java android bitmapimage

我正在开发一个需要一组效果的项目。

我不明白。请为我解释一下!

public static final String SCREEN_BLEND_FRAGMENT_SHADER = "varying highp vec2 textureCoordinate;\n" +
        " varying highp vec2 textureCoordinate2;\n" +
        "\n" +
        " uniform sampler2D inputImageTexture;\n" +
        " uniform sampler2D inputImageTexture2;\n" +
        " \n" +
        " void main()\n" +
        " {\n" +
        "     mediump vec4 textureColor = texture2D(inputImageTexture, textureCoordinate);\n" +
        "     mediump vec4 textureColor2 = texture2D(inputImageTexture2, textureCoordinate2);\n" +
        "     mediump vec4 whiteColor = vec4(1.0);\n" +
        "     gl_FragColor = whiteColor - ((whiteColor - textureColor2) * (whiteColor - textureColor));\n" +
        " }";

0 个答案:

没有答案