mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
palettizer: don't respect srgb flag for alpha textures
This commit is contained in:
parent
891937193a
commit
5f83882858
@ -471,11 +471,16 @@ fully_define() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Respect the _srgb flag. If this is set, it means the texture is in sRGB
|
// 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) {
|
if (_srgb) {
|
||||||
switch (_num_channels) {
|
switch (_num_channels) {
|
||||||
case 1:
|
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;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
_format = EggTexture::F_sluminance_alpha;
|
_format = EggTexture::F_sluminance_alpha;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user