mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Prefer immutable texture storage when available
This commit is contained in:
parent
427a7e4998
commit
d5bf094f9a
7 changed files with 42 additions and 24 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue