Bug 138951 - [GTK] Fix the broken edge-distance antialiasing
Summary: [GTK] Fix the broken edge-distance antialiasing
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-20 22:15 PST by JeongBong Seo
Modified: 2017-03-11 11:12 PST (History)
9 users (show)

See Also:


Attachments
Patch (4.48 KB, patch)
2014-11-20 22:23 PST, JeongBong Seo
no flags Details | Formatted Diff | Diff
Patch (4.71 KB, patch)
2014-11-20 22:35 PST, JeongBong Seo
jb.seo: review+
Details | Formatted Diff | Diff
after fix (119.11 KB, image/png)
2014-11-20 22:53 PST, JeongBong Seo
no flags Details
before fix (113.54 KB, image/png)
2014-11-20 22:53 PST, JeongBong Seo
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description JeongBong Seo 2014-11-20 22:15:51 PST
There exist a wrong matrix multiply to get viewport space position.
---------------------------------------------------------------------------------
vec4 toViewportSpace(vec2 pos) { return vec4(pos, 0., 1.) * u_modelViewMatrix; }
---------------------------------------------------------------------------------
It generates wrong position and affects the inflation ratio to each vertices.
The transformation matrix should be left side.

After fix the multiplication, I got little strange result.
Anti-aliased layer's (inner) contents are expanded 1px.
But it shouldn't happen and only edge should be inflated.

Than I just erase the clamp function to create transformedTexCoord, and finally, got the good result.
But in theory clamping the position should be there, because we using GL_REPEAT in many case.

Please give me some idea or comment.
Comment 1 JeongBong Seo 2014-11-20 22:23:03 PST
Created attachment 242024 [details]
Patch
Comment 2 JeongBong Seo 2014-11-20 22:35:41 PST
Created attachment 242025 [details]
Patch
Comment 3 JeongBong Seo 2014-11-20 22:53:00 PST
Created attachment 242026 [details]
after fix
Comment 4 JeongBong Seo 2014-11-20 22:53:20 PST
Created attachment 242027 [details]
before fix
Comment 5 JeongBong Seo 2014-11-20 22:54:41 PST
TEST URL : https://bug-124653-attachments.webkit.org/attachment.cgi?id=217424
Comment 6 JeongBong Seo 2014-11-20 23:10:49 PST
Comment on attachment 242025 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=242025&action=review

> Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:-177
> -            vec4 clampedPosition = clamp(vec4(position, 0., 1.), 0., 1.);

I'm not sure eliminating the clamp function. But with clamp, it shows expanded output.
Comment 7 JeongBong Seo 2014-11-30 20:38:25 PST
anybody?