parent
e112ecdeb9
commit
3be79a856c
@ -0,0 +1,29 @@ |
||||
package com.frank.camerafilter.filter.advance; |
||||
|
||||
import android.content.Context; |
||||
import android.opengl.GLES30; |
||||
|
||||
import com.frank.camerafilter.R; |
||||
import com.frank.camerafilter.filter.BaseFilter; |
||||
import com.frank.camerafilter.util.OpenGLUtil; |
||||
|
||||
public class BeautyColorInvertFilter extends BaseFilter { |
||||
|
||||
public BeautyColorInvertFilter(Context context) { |
||||
super(NORMAL_VERTEX_SHADER, OpenGLUtil.readShaderFromSource(context, R.raw.color_invert)); |
||||
} |
||||
|
||||
protected void onInit() { |
||||
super.onInit(); |
||||
} |
||||
|
||||
protected void onInitialized() { |
||||
super.onInitialized(); |
||||
} |
||||
|
||||
@Override |
||||
public void onInputSizeChanged(int width, int height) { |
||||
super.onInputSizeChanged(width, height); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,10 @@ |
||||
varying highp vec2 textureCoordinate; |
||||
|
||||
uniform sampler2D inputImageTexture; |
||||
|
||||
void main() |
||||
{ |
||||
lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); |
||||
|
||||
gl_FragColor = vec4((1.0 - textureColor.rgb), 1.0); |
||||
} |
Loading…
Reference in new issue