Reproduction steps:
1. Open the attached “IN-57673 Terrain Mipmaps Bug - 3D Core.zip“ project
2. Open the “SampleScene“
3. Go to Edit > Project Settings… > Quality
4. Under the “Textures” settings, set the “Global Mipmap Limit” to any option below “0: Full Resolution”
5. Select the “Terrain” GameObject in the Hierarchy
6. Under the Terrain component in the Inspector, select the Paint Terrain icon
7. Select the Paint Texture tool from the drop-down menu under the icons
8. Select one of the available Terrain Layers
9. Try painting the selected Layer on the Terrain in the Scene view
Expected result: The selected Terrain Layer is painted on the Terrain with no errors
Actual result: Black rectangular splotches are painted on the Terrain and its Splatmap, and errors are displayed in the Console
Reproducible with: 2021.3.32f1, 2022.3.13f1, 2023.1.20f1, 2023.2.0f1, 2023.3.0a14
Notes:
- Reproducible in a new project
- Reproducible in the Player
- The Terrain Tools Package helps reproduce the issue more consistently by importing and applying a Terrain Splatmap to a Terrain via the Terrain Toolbox (the second error is thrown to the Console when doing so)
- Once the issue is reproduced, neither removing the Terrain Tools Package nor deleting the “Library” folder and restarting the project, nor deleting the Terrain (including its Terrain data and all of the created Terrain Layers) and creating a new one, nor downgrading/upgrading the project resolve the issue
- In a new project, the issue reproducible versions are different:
Reproducible with: 2022.2.0a15, 2022.3.13f1, 2023.1.19f1
Not reproducible with: 2021.3.32f1, 2022.2.0a14, 2023.2.0b17, 2023.3.0a13
Full message of the first error (2021.3.32f1 (when downgraded) and newer):
Graphics.CopyTexture source and destination have different master texture limits. Source 1, Destination 0
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Full message of the second error (2022.3.13f1 and newer):
Graphics.CopyTexture source and destination have different mipmap limits. Source 0, Destination 1
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)