texture_sampler: remap px, py
This commit is contained in:
parent
e21f0883bd
commit
a3852c1a2c
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user