snap text on shader

This commit is contained in:
2025-08-23 22:16:00 -04:00
parent 5ce6fca275
commit 50ccf7393d
10 changed files with 101 additions and 64 deletions

View File

@@ -61,8 +61,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 = round(in.top_left_anchor * window.dim) + in.top_left_offset;
let bot_right = round(in.bottom_right_anchor * window.dim) + in.bottom_right_offset;
let size = bot_right - top_left;
let uv = vec2<f32>(