1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-20 03:35:18 +02:00

Prefer immutable texture storage when available

This commit is contained in:
sfan5
2025-04-06 20:25:03 +02:00
parent 427a7e4998
commit d5bf094f9a
7 changed files with 42 additions and 24 deletions

View File

@@ -363,7 +363,7 @@ inline SColor CImage::getPixelBox(s32 x, s32 y, s32 fx, s32 fy, s32 bias) const
}
}
s32 sdiv = s32_log2_s32(fx * fy);
s32 sdiv = core::u32_log2(fx * fy);
a = core::s32_clamp((a >> sdiv) + bias, 0, 255);
r = core::s32_clamp((r >> sdiv) + bias, 0, 255);