am 3b4d68a2: Merge "Remove gamma correction from color correction shader" into mnc-dev

* commit '3b4d68a294a2d6d8dba072f4ec2661473f966a63':
  Remove gamma correction from color correction shader
This commit is contained in:
Alan Viverette 2015-04-29 16:57:06 +00:00 committed by Android Git Automerger
commit 14a23e4727
1 changed files with 0 additions and 2 deletions

View File

@ -199,10 +199,8 @@ String8 ProgramCache::generateFragmentShader(const Key& needs) {
// un-premultiply if needed before linearization
fs << "gl_FragColor.rgb = gl_FragColor.rgb/gl_FragColor.a;";
}
fs << "gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(2.2));";
fs << "vec4 transformed = colorMatrix * vec4(gl_FragColor.rgb, 1);";
fs << "gl_FragColor.rgb = transformed.rgb/transformed.a;";
fs << "gl_FragColor.rgb = pow(gl_FragColor.rgb, vec3(1.0 / 2.2));";
if (!needs.isOpaque() && needs.isPremultiplied()) {
// and re-premultiply if needed after gamma correction
fs << "gl_FragColor.rgb = gl_FragColor.rgb*gl_FragColor.a;";