Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: broken on November 05, 2013, 04:06:32 AM

Title: Draggable Panel content blurring
Post by: broken 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!
Title: Re: Draggable Panel content blurring
Post by: ArenMook 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.
Title: Re: Draggable Panel content blurring
Post by: broken 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?
Title: Re: Draggable Panel content blurring
Post by: broken 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 :(
Title: Re: Draggable Panel content blurring
Post by: broken on November 06, 2013, 12:16:43 AM
In NGUI planned to have this functionality in the near future?
Title: Re: Draggable Panel content blurring
Post by: ArenMook 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.
Title: Re: Draggable Panel content blurring
Post by: broken 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?
Title: Re: Draggable Panel content blurring
Post by: ArenMook 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.
Title: Re: Draggable Panel content blurring
Post by: broken 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.
Title: Re: Draggable Panel content blurring
Post by: ArenMook on November 07, 2013, 04:40:49 AM
Can you upload this scene here as an attachment?
Title: Re: Draggable Panel content blurring
Post by: broken 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 (http://www.tasharen.com/forum/index.php?topic=6536.0)
But this is only visible in the build.
Title: Re: Draggable Panel content blurring
Post by: ArenMook on November 07, 2013, 09:39:47 AM
Got it, found the issue with the blur, will fix.
Title: Re: Draggable Panel content blurring
Post by: broken 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)?
Title: Re: Draggable Panel content blurring
Post by: ArenMook on November 08, 2013, 05:32:05 AM
Not seeing it on my end.
Title: Re: Draggable Panel content blurring
Post by: broken 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.