Welcome,
Guest
. Please
login
or
register
.
June 10, 2026, 01:35:43 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UILabel Z position rounding == argh
« previous
next »
Print
Pages: [
1
]
Author
Topic: UILabel Z position rounding == argh (Read 2257 times)
athos
Guest
UILabel Z position rounding == argh
«
on:
October 24, 2012, 09:44:06 PM »
MakePositionPerfect (called by OnFill) seems to be rounding the Z of labels to integers. This is a problem when a camera has clip planes of -2 to 2 (like the default) because you lose all your fidelity to position sprites at different depths when using different atlases.
Should UILabel be doing this?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: UILabel Z position rounding == argh
«
Reply #1 on:
October 24, 2012, 11:28:19 PM »
All widgets do that. That Z of 1 is simply 1 pixel. Camera may have clip planes of -2 to 2, but with UIRoot having a scale of 2 / screenHeight, that 1 unit of offset ends up being 2 / screenHeight in world space.
Logged
athos
Guest
Re: UILabel Z position rounding == argh
«
Reply #2 on:
October 25, 2012, 12:27:56 AM »
Nice! I was converting some existing UI over and forgot UIRoot applied that scale at the root. I'll need to update my depth hierarchy to whole numbers, but then I should be good to go. Thanks!
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
UILabel Z position rounding == argh