Clamp YUV videos to their visible size in the shader
Video textures can be larger than the visible size of the video.
Because they have bilinear filtering turned on for them, if the video is
scaled, then the this means that the part of the texture outside of the
video itself can be sampled, causing odd visible artifacts like
hairlines on the side of the image.
To fix this, pass in a clamp value of half a pixel (because of bilinear
filtering) inside of the visible rect and clamp all texture coordinates
to this maximum value in the fragment shader.
BUG=429640
Review URL: https://codereview.chromium.org/881963002
Cr-Commit-Position: refs/heads/master@{#314200}
CrOS-Libchrome-Original-Commit: a2a2970d72e7856444896600874fca9594f55437
1 file changed