Mon, 12 May 2025 21:14:22 +0200
fix texture scaling
src/texture.c | file | annotate | diff | comparison | revisions |
--- a/src/texture.c Mon May 12 21:13:24 2025 +0200 +++ b/src/texture.c Mon May 12 21:14:22 2025 +0200 @@ -169,9 +169,9 @@ return factors; } asc_vec2f uv_scale = factors; - uv_scale.u *= (float) tex->width; - uv_scale.u /= (float) surface_dimension.width; - uv_scale.v *= (float) tex->height; - uv_scale.v /= (float) surface_dimension.height; + uv_scale.u *= (float) surface_dimension.width; + uv_scale.u /= (float) tex->width; + uv_scale.v *= (float) surface_dimension.height; + uv_scale.v /= (float) tex->height; return uv_scale; }