Open yaustar opened 3 years ago
We had related discussion last week. It seems the UI system internally operates using pixel coordinates (not normalized to 0..1 range) and so does not handle texture resizing. When the texture is larger than what device supports, it will get resized to maximum supported, and that likely breaks the rendering here.
We can either change how the system works, or at least have some in-Editor warning when textures is >4k.
Maybe a warning to start with while we rework the system?
Edit: Although some devices may support higher resolutions and others may support lower so a warning won't help much here 🤔
Revoting for in editor warning about using >4K textures
Thread:: https://forum.playcanvas.com/t/change-image-ui-sprite-in-runtime/19700/5 Project: https://playcanvas.com/editor/scene/1138025
On desktop:
On Android chrome:
It renders correctly if it's a sprite component but not as a UI element.
My guess is that the texture height >4K so gets downsampled by the engine and has affected the UI rendering in some way.
Making the texture 50% smaller worksaround the issue.