mirror of
https://github.com/TeamMidnightDust/BetterLeavesLite.git
synced 2025-12-13 11:15:09 +01:00
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:
Binary file not shown.
@@ -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
|
||||
|
||||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
BIN
input/mask_32px.png
Normal file
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
BIN
input/mask_64px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.0 KiB |
Reference in New Issue
Block a user