Back to project page FxCameraApp.
The source code is released under:
MIT License
If you think the Android project FxCameraApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.af.experiments.FxCameraApp.shaders; // w w w . j a va 2 s . c om public class GlColorInvertShader extends GlShader { private static final String FRAGMENT_SHADER = "precision mediump float;" + "varying vec2 vTextureCoord;" + "uniform lowp sampler2D sTexture;" + "void main() {" + "lowp vec4 color = texture2D(sTexture, vTextureCoord);" + "gl_FragColor = vec4((1.0 - color.rgb), color.w);" + "}"; public GlColorInvertShader() { super(DEFAULT_VERTEX_SHADER, FRAGMENT_SHADER); } protected String mShaderName = "invert"; @Override public String getName() { return mShaderName; } }