Fix: UI graphics bug [MTT-6786] #848
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A workaround fix for the UI graphics bug that I tracked down with the help of @fernando-cortez
The bug is due to a regression caused by this commit in the unity trunk. In short, the issue is caused by a math issue when taking MipMap textures sizes into account when calculating the texel size for the UVs of the UI sprite meshes. The workaround fix is to make sure one of the quality levels allows for full resolution MipMaps (since anything less than full res causes the meshes to generate with the wrong UV scaling). In our case, I set the High quality setting on mobile to allow for full resolution textures, increased from half resolution.
There is a small performance/memory hit to be had by allowing full res textures on mobile, but it's a small price to pay to fix the visual bug and unblock the release. We'll just revert this change once the regression is fixed in the future. :)
Issue Number(s)
MTT-6786
Contribution checklist