From b44f14e1863d251cc960a6252c8d0110f3062215 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Thu, 16 Apr 2020 14:54:29 +0200 Subject: [PATCH] Fix MSAA blit vertex shader to match `wgpu` NDC --- wgpu/src/shader/blit.vert | 6 +++--- wgpu/src/shader/blit.vert.spv | Bin 1384 -> 1384 bytes wgpu/src/widget/canvas/frame.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wgpu/src/shader/blit.vert b/wgpu/src/shader/blit.vert index 1c081b9e..899cd39d 100644 --- a/wgpu/src/shader/blit.vert +++ b/wgpu/src/shader/blit.vert @@ -3,12 +3,12 @@ layout(location = 0) out vec2 o_Uv; const vec2 positions[6] = vec2[6]( - vec2(-1.0, -1.0), vec2(-1.0, 1.0), - vec2(1.0, 1.0), vec2(-1.0, -1.0), vec2(1.0, -1.0), - vec2(1.0, 1.0) + vec2(-1.0, 1.0), + vec2(1.0, 1.0), + vec2(1.0, -1.0) ); const vec2 uvs[6] = vec2[6]( diff --git a/wgpu/src/shader/blit.vert.spv b/wgpu/src/shader/blit.vert.spv index ad697d4828a2bd9a4e0bba013cfe47e7851c754f..e0b436ce70bd2da13bcb9a9d95e7a9414e3d2a6e 100644 GIT binary patch delta 44 tcmaFC^@3}|73Rq=n0YwW7#J8-KzQ;?W^G<|AWId91%X(7vm%Q-BLD-92*>~c delta 44 ucmaFC^@3}|73Rq=n0YwW7#J8-fS7;sOJ;3eK_E*Nh}D5uaI+$dJ0k!9VF;Z7 diff --git a/wgpu/src/widget/canvas/frame.rs b/wgpu/src/widget/canvas/frame.rs index 24fd0d7e..de4717f1 100644 --- a/wgpu/src/widget/canvas/frame.rs +++ b/wgpu/src/widget/canvas/frame.rs @@ -248,7 +248,7 @@ impl Frame { .transforms .current .raw - .pre_rotate(lyon::math::Angle::radians(angle)); + .pre_rotate(lyon::math::Angle::radians(-angle)); self.transforms.current.is_identity = false; }