center anchors on 0 0

This commit is contained in:
2025-08-10 20:29:16 -04:00
parent 848347e6b3
commit f2cbf90d1d
7 changed files with 24 additions and 20 deletions

View File

@@ -42,8 +42,8 @@ fn vs_main(
) -> VertexOutput {
var out: VertexOutput;
let top_left = in.top_left_anchor * window.dim + in.top_left_offset;
let bot_right = in.bottom_right_anchor * window.dim + in.bottom_right_offset;
let top_left = (in.top_left_anchor + 1.0) / 2.0 * window.dim + in.top_left_offset;
let bot_right = (in.bottom_right_anchor + 1.0) / 2.0 * window.dim + in.bottom_right_offset;
let size = bot_right - top_left;
var pos = top_left + vec2<f32>(