Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11603b7b authored by Dan Stoza's avatar Dan Stoza Committed by Android Git Automerger
Browse files

am 08a7c792: Merge "Remove gamma correction from color correction shader"

* commit '08a7c792':
  Remove gamma correction from color correction shader
parents f9a3b73e 08a7c792
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;";