Disable compression for lightmaps on Linux (due to low-quality alpha encoding)

This commit is contained in:
Wojtek Figat
2021-10-11 14:02:14 +02:00
parent faf266800c
commit bcbfaa347a
2 changed files with 8 additions and 0 deletions

View File

@@ -122,7 +122,11 @@ void ShadowsOfMordor::Builder::SceneBuildCache::UpdateLightmaps()
ImportTexture::Options options;
options.Type = TextureFormatType::HdrRGBA;
options.IndependentChannels = true;
#if PLATFORM_WINDOWS
options.Compress = Scene->GetLightmapSettings().CompressLightmaps;
#else
options.Compress = false; // TODO: use better BC7 compressor that would handle alpha more precisely (otherwise lightmaps have artifacts, see TextureTool.stb.cpp)
#endif
options.GenerateMipMaps = true;
options.IsAtlas = false;
options.sRGB = false;