From a3852c1a2cc64f6ef9599d3aee3e4b8f53e4bca5 Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Tue, 8 Apr 2025 20:30:53 -0500 Subject: [PATCH] texture_sampler: remap px, py --- texture_sampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/texture_sampler.py b/texture_sampler.py index fed53aa..550398c 100644 --- a/texture_sampler.py +++ b/texture_sampler.py @@ -40,7 +40,7 @@ def sample(im, l): #x = 1 - x y = 1 - y - px, py = int(x * width), int(y * height) + px, py = remap(x, 0, 1, 0, width - 1), remap(y, 0, 1, 0, height - 1) assert px < width and py < height color = im.getpixel((px, py))