Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Nicki on May 30, 2016, 09:15:10 AM
-
I've stumbled on a weird issue, where the geometry from NGUI is offset by exactly 0.25px up and left. The gizmos and handles are all correct, but the actual geometry is wrong.
I'm seeing it both in the editor and on devices, since we keep certain things at half res, it seems to get rounded up or something and we get a 1 px see through line on the UI even on fullscreen backgrounds.
http://imgur.com/iz8YBUn that shows how it looks.
Now I'm not sure what's going on, but it sure is annoying. Under normal circumstances it would not be seen, but since we're doubling UI size on retina displays it becomes very visible. Any suggestions as to what to do? I would rather not just offset the specific by 1,1 px, as it potentially ruins all anchoring and is just wrong. :)
-
Forgot to add, I'm using NGUI 3.9.4 and Unity 5.3.4p6.
If it hasn't been fixed between 3.9.4 and 3.9.8 (newest right now), I'd rather not upgrade, as we have various customizations that will take some time to "port" upwards.
-
On further investigation this seems to spring off from the dreaded half-pixel offset. :S
-
Found it..
It was the drawCallOffset in UIPanel which messed with everything
(http://i.imgur.com/skhGJws.png)
Commenting that out, makes everything align properly again in both editor and on device.
-
The half pixel offset is a DX9 thing that I've explained many times in the past. Not sure what other device you're getting it on -- it shouldn't affect mobiles.
-
No it's strange, but for whatever reason it's happening on mobiles for me too, both android and ios. Disabling the drawcall offset makes it work as you would expect.
-
So is this a fix that's going to be used officially?
We're doing a similar doubling technique for retina devices, and I've definitely seen some weirdness similar to this before.
-
No, because as I said, the half pixel offset is only used on DX9 hardware. Check UIPanel's Awake() function where it's set. If you are getting something unexpected, I would need a concrete repro case to look at.