fix texture scaling default tip

Mon, 12 May 2025 21:14:22 +0200

author
Mike Becker <universe@uap-core.de>
date
Mon, 12 May 2025 21:14:22 +0200
changeset 119
581c1735fb27
parent 118
830608f7e7d9

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;
 }

mercurial