RESOLVED FIXED 124653
[texmap] Borders on rotating images are hidden/wrongly rendered with edge distance antialiasing
https://bugs.webkit.org/show_bug.cgi?id=124653
Summary [texmap] Borders on rotating images are hidden/wrongly rendered with edge dis...
José Dapena Paz
Reported 2013-11-20 07:04:45 PST
Created attachment 217424 [details] Test case: rotating green box and circle are most obvious artifacts When TextureMapperGL has enabled edgeDistanceAntialiasing, the borders of the image fail to render properly, showing different artifacts. It is pretty obvious on circle images where the borders of the circle are exactly touching the image border. This is reproducible at least in WebKit Qt and WebKit Gtk (though I expect it to also fail on WebKitEFL as it uses coordinated graphics).
Attachments
Test case: rotating green box and circle are most obvious artifacts (2.22 KB, text/html)
2013-11-20 07:04 PST, José Dapena Paz
no flags
Patch (7.31 KB, patch)
2013-12-02 03:45 PST, José Dapena Paz
no flags
Patch (8.91 KB, patch)
2013-12-03 02:55 PST, José Dapena Paz
no flags
Patch (8.94 KB, patch)
2013-12-03 03:02 PST, José Dapena Paz
no flags
Fix to match the uniform precision qualifiers in Vertex and fragment (1.74 KB, patch)
2014-05-08 13:09 PDT, Prabhu Sundararaj
no flags
José Dapena Paz
Comment 1 2013-12-02 03:45:36 PST
Noam Rosenthal
Comment 2 2013-12-02 14:21:49 PST
Comment on attachment 218159 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218159&action=review Nice, see comments > Source/WebCore/platform/graphics/texmap/TextureMapperShaderProgram.cpp:328 > + vec4 clampedPosition = clamp(vec4(v_texCoord, 0., 1.), 0., 1.); > + vec2 texCoord = (u_textureSpaceMatrix * clampedPosition).xy; It's not a good idea to do this for every pixel. We should only do this when there's an actual texture. You should figure that into the other "optional" functions.
José Dapena Paz
Comment 3 2013-12-03 02:55:22 PST
José Dapena Paz
Comment 4 2013-12-03 03:02:44 PST
José Dapena Paz
Comment 5 2013-12-03 03:04:03 PST
(In reply to comment #4) > Created an attachment (id=218283) [details] > Patch New patch: * Now it only clamps on fragment shader when we have ENABLE_Texture and ENABLE_Antialiasing.
WebKit Commit Bot
Comment 6 2013-12-04 09:46:41 PST
Comment on attachment 218283 [details] Patch Clearing flags on attachment: 218283 Committed r160096: <http://trac.webkit.org/changeset/160096>
WebKit Commit Bot
Comment 7 2013-12-04 09:46:43 PST
All reviewed patches have been landed. Closing bug.
Prabhu Sundararaj
Comment 8 2014-05-08 13:09:40 PDT
Created attachment 231095 [details] Fix to match the uniform precision qualifiers in Vertex and fragment
Prabhu Sundararaj
Comment 9 2014-05-08 13:10:30 PDT
When the vertex and fragment shaders are linked together, then they will share a single global uniform name space. Hence, types and precisions of uniforms with the same name must match across all shaders that are linked into a single executable. As per GLSL_ES_Specification_3.00.3.pdf Page 124 12.3 Numeric Precision The fragment language has no default precision qualifier for floating point types. Hence for float, floating point vector and matrix variable declarations, either the declaration must include a precision qualifier or the default float precision must have been previously declared.
Note You need to log in before you can comment on or make changes to this bug.