src/texture.c

changeset 119
581c1735fb27
parent 117
d1267f656a97
--- 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;
 }

mercurial