Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: ryuuguu on June 18, 2012, 12:29:04 AM
-
I am trying to make a solid background for an area with a sprite. A simple single solid color. It works in the editor but becomes a semi transparent gradient on browsers (Mac Mini , Safari & Chrome). This happens with both sprite and sliced sprite. "Unlit/Transparent colored overlay" is used. color tint is 0,0,0,255
How does one make a simple solid non-transparent no-gradient sprite background that works on a browser.
-
Looks like a filter trying to blend the edges of your single pixel. Perhaps.
Does it work if you set the properties of the Import setting to "Filter Mode : Point" instead of Bilinear/Trilinear?
-
A border of 1 px and use a sliced sprite.
-
I ended up combining both. I used pixel on the import and put a 2 pixel border and then used regular sprite. one pixel was not enough. Still don't know why the shader looks different in editor than browser. Also tried on iPad and shader shows transparent on iPad like browser not solid like editor.
-
As Nicki said, use a sliced sprite for this. That's what it's designed to do -- allow you to stretch things while still maintaining the way borders look.
Border on import has nothing to do with it, assuming you use a sliced sprite. Leave it at 1. Nicki was talking about a border on the sprite itself. Select the atlas, select the sprite, specify a border of 1.