mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-07 16:48:40 +00:00
Enable cleanTransparent filter for mipmapping and improve its' algorithm (#11145)
This commit is contained in:
parent
90a7bd6a0a
commit
1da73418cd
6 changed files with 105 additions and 32 deletions
|
@ -23,13 +23,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
/* Fill in RGB values for transparent pixels, to correct for odd colors
|
||||
* appearing at borders when blending. This is because many PNG optimizers
|
||||
* like to discard RGB values of transparent pixels, but when blending then
|
||||
* with non-transparent neighbors, their RGB values will shpw up nonetheless.
|
||||
* with non-transparent neighbors, their RGB values will show up nonetheless.
|
||||
*
|
||||
* This function modifies the original image in-place.
|
||||
*
|
||||
* Parameter "threshold" is the alpha level below which pixels are considered
|
||||
* transparent. Should be 127 for 3d where alpha is threshold, but 0 for
|
||||
* 2d where alpha is blended.
|
||||
* transparent. Should be 127 when the texture is used with ALPHA_CHANNEL_REF,
|
||||
* 0 when alpha blending is used.
|
||||
*/
|
||||
void imageCleanTransparent(video::IImage *src, u32 threshold);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue