Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: apocriva on January 30, 2014, 11:17:28 PM
-
In some situations when scaling up a UI (to make "fat pixels"), I've found that the triangles rendered by NGUI are resulting in ever-so-slightly-off textures. This manifests as funny-looking jaggies along the edge of what should be straight lines.
(http://apocriva.com/images/funnyEdges.png)
This is remedied by putting in a very small nudge when calculating texture UVs.
(http://apocriva.com/images/funnyEdgesGone.png)
I've posted the small changes I made within NGUIText.cs and NGUIMath.cs for this. Thought it might be useful for others. :)
http://pastebin.com/C7cBW2d1
-
That's a strange hack, I must admit.
-
Little tiny precision errors make things round off incorrectly sometimes... bit this I've found to be unpredictable -- if I scale things up one way it works, another way it doesn't! iunno. :)
Oh wait now, it has become clearer once I started having something at the edge of the screen. There is a half-pixel offset being applied to the widget meshes that I wasn't expecting. Anyway, these are self-inflicted issues due to the fact that I'm forcing NGUI into pseudo-pixel-perfection and not really letting it be pixel perfect. :)
-
This fix messes up the new anchoring system for me.
-
I have similar problem :
a strange line appear when i scale down a sprite equiped with a triangle image
(http://www.thebestsync.com/report/20140208.jpg)