palettizer: don't respect srgb flag for alpha textures

This commit is contained in:
Brian Lach 2023-02-14 12:58:57 -05:00 committed by rdb
parent 891937193a
commit 5f83882858

View File

@ -471,11 +471,16 @@ fully_define() {
}
// Respect the _srgb flag. If this is set, it means the texture is in sRGB
// space and the format should be changed to reflect that.
// color space and the format should be changed to reflect that.
if (_srgb) {
switch (_num_channels) {
case 1:
_format = EggTexture::F_sluminance;
// Don't respect sRGB for textures using the F_alpha format, which
// indicates that the image represents an alpha channel, not a color
// channel.
if (_format != EggTexture::F_alpha) {
_format = EggTexture::F_sluminance;
}
break;
case 2:
_format = EggTexture::F_sluminance_alpha;