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).
Created attachment 218159 [details] Patch
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.
Created attachment 218282 [details] Patch
Created attachment 218283 [details] Patch
(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.
Comment on attachment 218283 [details] Patch Clearing flags on attachment: 218283 Committed r160096: <http://trac.webkit.org/changeset/160096>
All reviewed patches have been landed. Closing bug.
Created attachment 231095 [details] Fix to match the uniform precision qualifiers in Vertex and fragment
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.