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

Commit ae7f4043 authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-merger
Browse files

Merge "Increase precision in rounded corner shader" into qt-dev

am: 61daef82

Change-Id: I10d4d9ba9effa7349587ecdb2591dbe6b3f6d66b
parents 3ac83c5b 61daef82
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -575,7 +575,9 @@ String8 ProgramCache::generateFragmentShader(const Key& needs) {
            float applyCornerRadius(vec2 cropCoords)
            {
                vec2 position = cropCoords - cropCenter;
                vec2 dist = abs(position) + vec2(cornerRadius) - cropCenter;
                // Increase precision here so that a large corner radius doesn't
                // cause floating point error
                highp vec2 dist = abs(position) + vec2(cornerRadius) - cropCenter;
                float plane = length(max(dist, vec2(0.0)));
                return 1.0 - clamp(plane - cornerRadius, 0.0, 1.0);
            }