diff options
author | 2024-05-12 13:55:05 +0200 | |
---|---|---|
committer | 2024-05-12 13:55:05 +0200 | |
commit | b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc (patch) | |
tree | ad2496a40f9f4ee7850cef5fa8dd0ed2b8e214ef | |
parent | fa458a3009c3644300bf9475fcf8d46a67d194c6 (diff) | |
parent | 74a4ba65d6fea0c68dfbf721230c4abf36505e61 (diff) | |
download | iced-b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc.tar.gz iced-b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc.tar.bz2 iced-b30d34f728fdae65d4d2cb0afe2dcade9b4bb0dc.zip |
Merge pull request #2440 from iced-rs/align-images-to-pixel-grid
Align images to the (logical) pixel grid in `iced_wgpu`
Diffstat (limited to '')
-rw-r--r-- | wgpu/src/shader/image.wgsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wgpu/src/shader/image.wgsl b/wgpu/src/shader/image.wgsl index accefc17..0eeb100f 100644 --- a/wgpu/src/shader/image.wgsl +++ b/wgpu/src/shader/image.wgsl @@ -38,7 +38,7 @@ fn vs_main(input: VertexInput) -> VertexOutput { out.opacity = input.opacity; // Calculate the vertex position and move the center to the origin - v_pos = input.pos + v_pos * input.scale - input.center; + v_pos = round(input.pos) + v_pos * input.scale - input.center; // Apply the rotation around the center of the image let cos_rot = cos(input.rotation); |