Created
March 27, 2018 22:08
-
-
Save omarojo/51ce5bb8f4b20f2ecc4f0d1d0b4dd0d2 to your computer and use it in GitHub Desktop.
Contrast Shader (GPUImage)
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
varying vec2 textureCoordinate; | |
uniform sampler2D inputImageTexture; | |
uniform float contrast; | |
void main() | |
{ | |
vec4 textureColor = texture2D(inputImageTexture, textureCoordinate); | |
gl_FragColor = vec4(((textureColor.rgb - vec3(0.5)) * contrast + vec3(0.5)), textureColor.w); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment