diff --git a/render/wgpu/shaders/blend/alpha.wgsl b/render/wgpu/shaders/blend/alpha.wgsl index 6da3470e4579e..29b8434f81ee1 100644 --- a/render/wgpu/shaders/blend/alpha.wgsl +++ b/render/wgpu/shaders/blend/alpha.wgsl @@ -12,8 +12,8 @@ struct VertexOutput { @vertex fn main_vertex(in: common__VertexInput) -> VertexOutput { - let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 1.0, 1.0); - let uv = vec2((pos.x + 1.0) / 2.0, -((pos.y - 1.0) / 2.0)); + let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); + let uv = vec2(in.position.xy); return VertexOutput(pos, uv); } diff --git a/render/wgpu/shaders/blend/darken.wgsl b/render/wgpu/shaders/blend/darken.wgsl index d28787ec63467..af4163a11e69f 100644 --- a/render/wgpu/shaders/blend/darken.wgsl +++ b/render/wgpu/shaders/blend/darken.wgsl @@ -12,8 +12,8 @@ struct VertexOutput { @vertex fn main_vertex(in: common__VertexInput) -> VertexOutput { - let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 1.0, 1.0); - let uv = vec2((pos.x + 1.0) / 2.0, -((pos.y - 1.0) / 2.0)); + let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); + let uv = vec2(in.position.xy); return VertexOutput(pos, uv); } diff --git a/render/wgpu/shaders/blend/difference.wgsl b/render/wgpu/shaders/blend/difference.wgsl index 5aea5b4921266..d174ae818c8d5 100644 --- a/render/wgpu/shaders/blend/difference.wgsl +++ b/render/wgpu/shaders/blend/difference.wgsl @@ -12,8 +12,8 @@ struct VertexOutput { @vertex fn main_vertex(in: common__VertexInput) -> VertexOutput { - let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 1.0, 1.0); - let uv = vec2((pos.x + 1.0) / 2.0, -((pos.y - 1.0) / 2.0)); + let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); + let uv = vec2(in.position.xy); return VertexOutput(pos, uv); } diff --git a/render/wgpu/shaders/blend/erase.wgsl b/render/wgpu/shaders/blend/erase.wgsl index bed157c8b09c7..c476b63ff1bea 100644 --- a/render/wgpu/shaders/blend/erase.wgsl +++ b/render/wgpu/shaders/blend/erase.wgsl @@ -12,8 +12,8 @@ struct VertexOutput { @vertex fn main_vertex(in: common__VertexInput) -> VertexOutput { - let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 1.0, 1.0); - let uv = vec2((pos.x + 1.0) / 2.0, -((pos.y - 1.0) / 2.0)); + let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); + let uv = vec2(in.position.xy); return VertexOutput(pos, uv); } diff --git a/render/wgpu/shaders/blend/hardlight.wgsl b/render/wgpu/shaders/blend/hardlight.wgsl index 3312cb03d7685..babd9778559f4 100644 --- a/render/wgpu/shaders/blend/hardlight.wgsl +++ b/render/wgpu/shaders/blend/hardlight.wgsl @@ -12,8 +12,8 @@ struct VertexOutput { @vertex fn main_vertex(in: common__VertexInput) -> VertexOutput { - let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 1.0, 1.0); - let uv = vec2((pos.x + 1.0) / 2.0, -((pos.y - 1.0) / 2.0)); + let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); + let uv = vec2(in.position.xy); return VertexOutput(pos, uv); } diff --git a/render/wgpu/shaders/blend/invert.wgsl b/render/wgpu/shaders/blend/invert.wgsl index 06e2093c875c2..45046d4fd55ef 100644 --- a/render/wgpu/shaders/blend/invert.wgsl +++ b/render/wgpu/shaders/blend/invert.wgsl @@ -12,8 +12,8 @@ struct VertexOutput { @vertex fn main_vertex(in: common__VertexInput) -> VertexOutput { - let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 1.0, 1.0); - let uv = vec2((pos.x + 1.0) / 2.0, -((pos.y - 1.0) / 2.0)); + let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); + let uv = vec2(in.position.xy); return VertexOutput(pos, uv); } diff --git a/render/wgpu/shaders/blend/lighten.wgsl b/render/wgpu/shaders/blend/lighten.wgsl index 83d24fb42fe55..b7dcf43001cd1 100644 --- a/render/wgpu/shaders/blend/lighten.wgsl +++ b/render/wgpu/shaders/blend/lighten.wgsl @@ -12,8 +12,8 @@ struct VertexOutput { @vertex fn main_vertex(in: common__VertexInput) -> VertexOutput { - let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 1.0, 1.0); - let uv = vec2((pos.x + 1.0) / 2.0, -((pos.y - 1.0) / 2.0)); + let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); + let uv = vec2(in.position.xy); return VertexOutput(pos, uv); } diff --git a/render/wgpu/shaders/blend/multiply.wgsl b/render/wgpu/shaders/blend/multiply.wgsl index 186409701ac99..d83cd084b5148 100644 --- a/render/wgpu/shaders/blend/multiply.wgsl +++ b/render/wgpu/shaders/blend/multiply.wgsl @@ -12,8 +12,8 @@ struct VertexOutput { @vertex fn main_vertex(in: common__VertexInput) -> VertexOutput { - let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 1.0, 1.0); - let uv = vec2((pos.x + 1.0) / 2.0, -((pos.y - 1.0) / 2.0)); + let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); + let uv = vec2(in.position.xy); return VertexOutput(pos, uv); } diff --git a/render/wgpu/shaders/blend/overlay.wgsl b/render/wgpu/shaders/blend/overlay.wgsl index 0a938f1192b54..9d330b18eba8c 100644 --- a/render/wgpu/shaders/blend/overlay.wgsl +++ b/render/wgpu/shaders/blend/overlay.wgsl @@ -12,8 +12,8 @@ struct VertexOutput { @vertex fn main_vertex(in: common__VertexInput) -> VertexOutput { - let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 1.0, 1.0); - let uv = vec2((pos.x + 1.0) / 2.0, -((pos.y - 1.0) / 2.0)); + let pos = common__globals.view_matrix * transforms.world_matrix * vec4(in.position.x, in.position.y, 0.0, 1.0); + let uv = vec2(in.position.xy); return VertexOutput(pos, uv); }