mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 21:23:18 +02:00
Fixing the bad assignment for the srgb textures
This commit is contained in:
parent
274f238ac0
commit
9ca4926c1d
1 changed files with 2 additions and 1 deletions
|
@ -106,10 +106,11 @@ Texture* Texture::unserialize(Usage usage, TextureUsageType usageType, const ktx
|
|||
Format texelFormat = Format::COLOR_SRGBA_32;
|
||||
|
||||
if (header.getGLFormat() == ktx::GLFormat::BGRA && header.getGLType() == ktx::GLType::UNSIGNED_BYTE && header.getTypeSize() == 4) {
|
||||
mipFormat = Format::COLOR_BGRA_32;
|
||||
if (header.getGLInternaFormat_Uncompressed() == ktx::GLInternalFormat_Uncompressed::RGBA8) {
|
||||
mipFormat = Format::COLOR_BGRA_32;
|
||||
texelFormat = Format::COLOR_RGBA_32;
|
||||
} else if (header.getGLInternaFormat_Uncompressed() == ktx::GLInternalFormat_Uncompressed::SRGB8_ALPHA8) {
|
||||
mipFormat = Format::COLOR_BGRA_32;
|
||||
texelFormat = Format::COLOR_SRGBA_32;
|
||||
} else {
|
||||
return nullptr;
|
||||
|
|
Loading…
Reference in a new issue