GPUImage中曝光滤镜实现——GPUImageExposureFilter

核心代码:

 1  varying highp vec2 textureCoordinate;
 2  
 3  uniform sampler2D inputImageTexture;
 4  uniform highp float exposure;
 5  
 6  void main()
 7  {
 8      highp vec4 textureColor = texture2D(inputImageTexture, textureCoordinate);
 9      
10      gl_FragColor = vec4(textureColor.rgb * pow(2.0, exposure), textureColor.w);
11  }

其中exposure的取值范围为[-10,10]

https://github.com/BradLarson/GPUImage

posted @ 2017-05-09 10:42  bky2016  阅读(468)  评论(0编辑  收藏  举报