1
0
Fork 0

push blending out by 1

This commit is contained in:
Sean Sube 2023-11-12 23:28:47 -06:00
parent 7106e96e77
commit 43944b7001
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 4 additions and 4 deletions

View File

@ -107,11 +107,11 @@ def make_tile_mask(
# sort gradient points
p1_h = adj_tile_h - 1
p2_h = tile_h - adj_tile_h
points_h = [0, min(p1_h, p2_h), max(p1_h, p2_h), tile_h - 1]
points_h = [-1, min(p1_h, p2_h), max(p1_h, p2_h), tile_h]
p1_w = adj_tile_w - 1
p2_w = tile_w - adj_tile_w
points_w = [0, min(p1_w, p2_w), max(p1_w, p2_w), tile_w - 1]
points_w = [-1, min(p1_w, p2_w), max(p1_w, p2_w), tile_w]
# build gradients
edge_t, edge_l, edge_b, edge_r = edges
@ -156,8 +156,8 @@ def blend_tiles(
if adj_tile < tile:
# sort gradient points
p1 = (adj_tile * scale) - 1
p2 = (tile - adj_tile) * scale
points = [0, min(p1, p2), max(p1, p2), (tile * scale) - 1]
p2 = (tile - adj_tile - 1) * scale
points = [-1, min(p1, p2), max(p1, p2), (tile * scale)]
# gradient blending
grad_x, grad_y = get_tile_grads(left, top, adj_tile, width, height)