Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Konstantin on June 11, 2014, 04:36:13 AM
-
I have a separate camera that renders NGUI to a RenderTexture. Size of the texture is different (sometimes a lot) from the screen size. Sprites are all right but I get blurry text.
So far I have done:
- removed UIRoot, UICamera
- set valid orthographicSize and aspect in my camera using custom script
- set all scales to 1
- checked that all transforms are integer
- set Keep crisp = Always
In my rendering script
1. set all text values in UILabels
2. GetComponent<UIPanel>().Refresh();
3. camera.Render()
Camera component is disabled all the time as it renders pictures on demand only.
I have tried calling some UILabel methods before rendering with no luck.
I can get crisp text if I fiddle with one of the UILabels in the scene view after running the scene. That updates all labels at once and they remain crisp.
-
There is nothing you can do. If the size of the render texture differs from the screen size, it's simply impossible to get crisp results.
Why are you doing this? If you want in-world UI, do just that. No need to render anything to a texture. Create a game object, put a UIPanel script on it, then add widgets to it like you normally would. Position this panel (and scale it, of course) as you would any other 3D game object.
-
The resulting image is posted to Facebook, hence the size requirements. Seems I need another way of putting text on it.