aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-11-04 19:09:35 -0500
committerGitHub <noreply@github.com>2016-11-04 19:09:35 -0500
commit516be8f85c0c79b16c3841c60d887661abe91e81 (patch)
tree38ef10fcd080f666850afbc1a9241e7fc12dbc94
parent2b4a7b0b7ad9dd568dfde15ab47dc634ec561d70 (diff)
parentd62e14f8b1e1d8a332d5d946c6932c20371a5971 (diff)
downloadservo-516be8f85c0c79b16c3841c60d887661abe91e81.tar.gz
servo-516be8f85c0c79b16c3841c60d887661abe91e81.zip
Auto merge of #14074 - glennw:shader-hot-fix, r=pcwalton
Manually copy across a shader fix from WR. This fix has landed in WR, but WR can't be updated right now, due to a scroll change landing in WR without the Servo PR being ready quite yet. Fixes #14061. Fixes #14073. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14074) <!-- Reviewable:end -->
-rw-r--r--resources/shaders/ps_image_clip.vs.glsl11
1 files changed, 3 insertions, 8 deletions
diff --git a/resources/shaders/ps_image_clip.vs.glsl b/resources/shaders/ps_image_clip.vs.glsl
index b272b271401..5426d997e4d 100644
--- a/resources/shaders/ps_image_clip.vs.glsl
+++ b/resources/shaders/ps_image_clip.vs.glsl
@@ -27,14 +27,9 @@ void main(void) {
write_clip(clip);
// vUv will contain how many times this image has wrapped around the image size.
- vec2 st0 = image.st_rect.xy;
- vec2 st1 = image.st_rect.zw;
-
- if (image.has_pixel_coords) {
- vec2 texture_size = vec2(textureSize(sDiffuse, 0));
- st0 /= texture_size;
- st1 /= texture_size;
- }
+ vec2 texture_size = vec2(textureSize(sDiffuse, 0));
+ vec2 st0 = image.st_rect.xy / texture_size;
+ vec2 st1 = image.st_rect.zw / texture_size;
vTextureSize = st1 - st0;
vTextureOffset = st0;