Search Issue Tracker
Won't Fix
Votes
1
Found in
2021.3.5f1
2022.1.5f1
2022.2.0a16
Issue ID
UUM-4007
Regression
No
[Android] Texture Format Override is not applied to Lightmaps when Texture Compression is set to Use Player Settings
How to reproduce:
1. Open the user's attached "T1245491_Lightmap.zip" project
2. Set the Platform to Android (File > Build Settings... > Android > Switch Target)
3. Make sure "Texture Compression" is set to "Use Player Settings"
4. Open the player Settings (Edit > Project Settings... > Player)
5. Make sure "Texture compression format" is set to "ASTC"
6. Open Lighting Settings (Window > Rendering > Lighting)
7. Generate Lighting, wait for the Lighting to finish generating
8. In the Project window select Assets > Scenes > SampleScene > Lightmap-0_comp_light
9. In the Inspector observe Android Compression Format
Expected results: The compression format is "RGB(A) Compressed ASTC 4x4 block"
Actual results: The compression format is "RGBA Compressed ETC2 8 bits"
Reproducible with: 2021.3.5f1, 2022.1.4f1, 2022.2.0a16
Could not test with: 2020.3.35f1 and earlier because the Texture Compression Format setting for Android in Player Settings was not yet introduced
Reproduced on:
Windows 10
macOS 12.1 (user's info)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Sprite Masks affect Sprite Renderers outside their range when a Light2D is present with specific Target Sorting Layers selected
- URP Lens Flare is rendered in the wrong position when Render Graph Compatibility Mode is enabled and Render Scaling is not 0
- Editor crashes on DrvPresentBuffers when loading RenderDoc while using OpenGLES 3.0 or OpenGLES 2.0 Graphics API
- [Test Runner] Incorrect name under Window > Panel after project restart
- [iOS] Crash when using fallback fonts created at runtime
Resolution Note:
In the provided repro project Lightmap Encoding is set to Normal Quality in Project Settings -> Player Settings. This causes Unity to encode the lightmap data as RGBM (see https://docs.unity3d.com/Manual/Lightmaps-TechnicalInformation.html). Some years ago, we found out that ASTC does not work well with RGBM-encoded data. In fact, the older format ETC2 is better in this case, and therefore Unity chooses this format (more details in this blog post: https://community.arm.com/arm-community-blogs/b/graphics-gaming-and-vr-blog/posts/high-quality-rgbm-texture-compression-with-astc). Therefore this behaviour is actually intensional.
Where applicable, we recommend to use Lightmap Encoding = High Quality. With this setting, Unity will treat lightmaps as HDR data (so it won't use RGBM) and in this case ASTC works great so Unity chooses it, as expected.