Author Topic: Draggable Panel content blurring  (Read 9676 times)

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Draggable Panel content blurring
« on: November 05, 2013, 04:06:32 AM »
Hi!

I have a panel (Clipped Panel for Chat, attach1, attach3). Sometimes when I scroll the list (with scroll, drag or scrollwheel), the content becomes blurred (attach2). Each message is a separate UILabel with BoxCollider for nickname. Elements are inserted into the table (attach4).  I have tried different settings panel, grid instead of table, but without result.
Why?

Thanks!
« Last Edit: November 05, 2013, 04:52:38 AM by broken »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel content blurring
« Reply #1 on: November 05, 2013, 05:15:23 AM »
Easiest thing to do is to snap it to pixels inside the shader used to draw it. The Unity 4.3 beta shaders for the 2D system do this, for example.

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Draggable Panel content blurring
« Reply #2 on: November 05, 2013, 06:28:26 AM »
Easiest thing to do is to snap it to pixels inside the shader used to draw it. The Unity 4.3 beta shaders for the 2D system do this, for example.

 :'( sadly, I have no idea how to do it :(
Perhaps there are other ways?
« Last Edit: November 05, 2013, 07:00:25 AM by broken »

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Draggable Panel content blurring
« Reply #3 on: November 05, 2013, 07:06:53 AM »
The only thing that comes to my mind is add UICenterOnChild script on Table. But still very noticeable blurring when moving list. And I would like to normal behavior without UICenterOnChild script.

UPD1: No, the script UICenterOnChild it's not what need in my situation :(
« Last Edit: November 05, 2013, 07:25:57 AM by broken »

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Draggable Panel content blurring
« Reply #4 on: November 06, 2013, 12:16:43 AM »
In NGUI planned to have this functionality in the near future?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel content blurring
« Reply #5 on: November 06, 2013, 07:22:50 AM »
I can add a shader for it later, sure. Although as I mentioned, anyone can do it since this shader already exists in the 4.3 beta.

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Draggable Panel content blurring
« Reply #6 on: November 06, 2013, 08:05:48 AM »
I can add a shader for it later, sure. Although as I mentioned, anyone can do it since this shader already exists in the 4.3 beta.

I am not in the beta testers. And I do not know if I could adapt this shader to NGUI. That is, I can solve this problem with blurring only after Unity 4.3?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel content blurring
« Reply #7 on: November 06, 2013, 08:21:09 AM »
That would be one option. I am not seeing this issue in the scroll view example btw. It always remains pixel perfect when dragging -- whether through scroll wheel or otherwise. You can see it yourself by changing some of the labels in it to a dynamic font, Arial size 18, making them pixel perfect, and then dragging the panel. If you look at the panel, adding position.x + panel's clipping center.x should add up to a whole integer. In all my test cases it does, meaning the result is pixel perfect.

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Draggable Panel content blurring
« Reply #8 on: November 07, 2013, 01:13:43 AM »
I am not seeing this issue in the scroll view example btw.

My steps:
1. Open Scroll View Example
2. Disable existing items.
3. Add UILabel to Grid. UILabel - Dynamic Font, Arial, 12, Resize Height, Correct. Clone item.
4. Grid vertical, set cell height, reposition now.
5. Disable background image (to make it easier to see).

See Attach image. Here it is not very noticeable (although you can see), but for example on some other dynamic fonts and
bitmap fonts it is very noticeable.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel content blurring
« Reply #9 on: November 07, 2013, 04:40:49 AM »
Can you upload this scene here as an attachment?

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Draggable Panel content blurring
« Reply #10 on: November 07, 2013, 08:00:47 AM »
Here, I've done all over again. Changed your example. You can not always see it, but quite often.
How correct save scene without NGUI code?
Attach a scene and the script, without NGUI code directory.
You can also reproduce the problem which I have written in this topic. http://www.tasharen.com/forum/index.php?topic=6536.0
But this is only visible in the build.
« Last Edit: November 07, 2013, 08:59:28 AM by broken »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel content blurring
« Reply #11 on: November 07, 2013, 09:39:47 AM »
Got it, found the issue with the blur, will fix.

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Draggable Panel content blurring
« Reply #12 on: November 07, 2013, 09:48:07 AM »
Got it, found the issue with the blur, will fix.

Ufff, I really thought it was me doing something wrong :o
What about the second question about the tabs (Clipped Panels)?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Draggable Panel content blurring
« Reply #13 on: November 08, 2013, 05:32:05 AM »
Not seeing it on my end.

broken

  • Full Member
  • ***
  • Thank You
  • -Given: 1
  • -Receive: 4
  • Posts: 140
    • View Profile
Re: Draggable Panel content blurring
« Reply #14 on: November 08, 2013, 06:03:13 AM »
Not seeing it on my end.

You probably have not noticed, although in the video that I post is clearly visible. This is repeated each time (web build, not editor). If I'm not mistaken it only happens once. Refresh panel doesnt help.
« Last Edit: November 09, 2013, 01:00:17 AM by broken »