mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Client: upscale [mask or base image (#15205)
This improves texture pack compatibility. Masks are expected to be of the same size as the base texture. This change upscales the smaller texture if needed. The behaviour is now the same as a.png^b.png and a.png^[overlay:b.png (to mention a few).
This commit is contained in:
parent
a19d0033bc
commit
95d7348a08
5 changed files with 24 additions and 2 deletions
|
@ -1447,6 +1447,8 @@ bool ImageSource::generateImagePart(std::string_view part_of_name,
|
|||
|
||||
video::IImage *img = generateImage(filename, source_image_names);
|
||||
if (img) {
|
||||
upscaleImagesToMatchLargest(baseimg, img);
|
||||
|
||||
apply_mask(img, baseimg, v2s32(0, 0), v2s32(0, 0),
|
||||
img->getDimension());
|
||||
img->drop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue