feat: more masks for higher-res resourcepacks

(The pixel count in the file name refers to the base texture's resolution)
This commit is contained in:
Martin Prokoph
2025-03-24 21:53:07 +01:00
parent e88015eae0
commit d036b045e2
5 changed files with 3 additions and 1 deletions

Binary file not shown.

View File

@@ -278,7 +278,9 @@ def generateTexture(root, infile, useProgrammerArt=False):
out.paste(texture, (int(width / 2 + width * x), int(height / 2 + height * y)))
# As the last step, we apply our custom mask to round the edges and smoothen things out
mask = Image.open('input/mask.png').convert('L').resize(out.size, resample=Image.NEAREST)
mask_location = f"input/mask_{width}px.png"
if not os.path.isfile(mask_location): mask_location = "input/mask_16px.png"
mask = Image.open(mask_location).convert('L').resize(out.size, resample=Image.NEAREST)
out = Image.composite(out, transparent, mask)
# Finally, we save the texture to the assets folder

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

BIN
input/mask_32px.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
input/mask_64px.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB