Created
May 12, 2013 21:11
-
-
Save kazukitanaka0611/5564942 to your computer and use it in GitHub Desktop.
This is Filter for https://github.com/kazukitanaka0611/GLCameraTemplate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@implementation InvertFilterOpenGLView | |
- (NSString *)getFragmetShaderString | |
{ | |
NSString *const kInvertFragmentShaderString = SHADER_STRING | |
( | |
varying highp vec2 textureCoordinate; | |
uniform sampler2D inputImageTexture; | |
void main() | |
{ | |
lowp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); | |
gl_FragColor = vec4((1.0 - textureColor.rgb), textureColor.w); | |
} | |
); | |
return kInvertFragmentShaderString; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment