Author Topic: pixels error while moving sliced sprite.  (Read 3105 times)

solar

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
pixels error while moving sliced sprite.
« on: April 08, 2015, 05:03:54 AM »
Hi there,
 
    I found that while I move a sliced sprite like img3, the pixels of the edge changed from img1 to img2.
    Anyone know how to fixed it?
    Thanks.




solar

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: pixels error while moving sliced sprite.
« Reply #1 on: April 08, 2015, 10:58:14 AM »
plz help....... or did anyone also find this bug?

zbyhoo

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Re: pixels error while moving sliced sprite.
« Reply #2 on: April 08, 2015, 03:37:35 PM »
Do you move it by multiplication of pixel (like 1 or 4 pixels) or by some value (like 3.5 pixels).
In the beginning, your sprite is pixel perfect, but when you start moving it by floating point value, this sprite border can be between two pixels and it seems blurred.

From top of my had I see two solutions.
1) move it by integer value
2) try setting sprite atlas texture import setting: filtering -> Point

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: pixels error while moving sliced sprite.
« Reply #3 on: April 09, 2015, 03:45:57 PM »
Your pictures don't work, solar.

Make sure your NGUI version is up to date. NGUI doesn't allow moving scroll views by non-integer values anymore, although you can still do it via code.

solar

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: pixels error while moving sliced sprite.
« Reply #4 on: April 13, 2015, 05:18:48 AM »
thanks for reply Aren.
I'm using NGUI 3.8.1.
Could I mail some texture to u plz?
I really don't know how to send Texture in the post... Although I can see them now...

Simply saying: When I move the sprite, the sprite edge changed. Some pixels will miss.

example: a sprite at localposition(0,0,0) is different from localposition(16,0,0). The sprite edge miss 1 or 2 pixels.
And UITexture also has the problem..

I'm moving them by interger value.
Thanks.

solar

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 7
    • View Profile
Re: pixels error while moving sliced sprite.
« Reply #5 on: April 15, 2015, 01:19:36 AM »
help.. thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: pixels error while moving sliced sprite.
« Reply #6 on: April 16, 2015, 07:13:48 AM »
Your links point to personal images "img.my.csdn". No one but you can see them. When making a post you have an option to attach files. Attach the images there. Alternatively you can email them to support at tasharen.com.

3.8.1 is not the latest -- 3.8.2 is. You should still update.

If moving a sprite from 0 to 16 made some part of it "miss" pixels then it suggests that your screen is not pixel perfect. UIRoot must be set to "flexible" style, you must be on NGUI 3.8.2, and all scales of objects must be [1, 1, 1] (except UIRoot).