mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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.
This commit is contained in:
parent
cfef68f92d
commit
d62e14f8b1
1 changed files with 3 additions and 8 deletions
|
@ -27,14 +27,9 @@ void main(void) {
|
||||||
write_clip(clip);
|
write_clip(clip);
|
||||||
|
|
||||||
// vUv will contain how many times this image has wrapped around the image size.
|
// vUv will contain how many times this image has wrapped around the image size.
|
||||||
vec2 st0 = image.st_rect.xy;
|
vec2 texture_size = vec2(textureSize(sDiffuse, 0));
|
||||||
vec2 st1 = image.st_rect.zw;
|
vec2 st0 = image.st_rect.xy / texture_size;
|
||||||
|
vec2 st1 = image.st_rect.zw / texture_size;
|
||||||
if (image.has_pixel_coords) {
|
|
||||||
vec2 texture_size = vec2(textureSize(sDiffuse, 0));
|
|
||||||
st0 /= texture_size;
|
|
||||||
st1 /= texture_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
vTextureSize = st1 - st0;
|
vTextureSize = st1 - st0;
|
||||||
vTextureOffset = st0;
|
vTextureOffset = st0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue