Welcome,
Guest
. Please
login
or
register
.
May 06, 2026, 10:26:52 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Seems to be half pixel problem
« previous
next »
Print
Pages: [
1
]
Author
Topic: Seems to be half pixel problem (Read 6444 times)
zhenghongzhi
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 4
Seems to be half pixel problem
«
on:
October 29, 2015, 04:30:52 AM »
When I place a image on the left-top corner at (0,0), there is a small gap on the top?
Is this the half pixel problem? How can I fix this? Thank you!
Unity5.2.1
NGUI3.9.4b
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Seems to be half pixel problem
«
Reply #1 on:
October 29, 2015, 07:33:33 AM »
Most likely because your window's dimensions are not dividable by two. What is its size?
Logged
zhenghongzhi
Newbie
Thank You
-Given: 0
-Receive: 0
Posts: 4
Re: Seems to be half pixel problem
«
Reply #2 on:
October 29, 2015, 09:24:25 PM »
Yeah, I checked that and that's the problem. Thank you
Now I have another question. My sprite is 465*123, and it becomes 466*124 in the scene. Anything causes this?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Seems to be half pixel problem
«
Reply #3 on:
October 31, 2015, 02:07:12 AM »
1 pixel of padding is added automatically in order to make dimensions dividable by two, otherwise you can't center a sprite as it would fall in between of pixels.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Seems to be half pixel problem