|
Hey, I've successfully managed to load a .png file to a texture and display it on a programmatically generated mesh. However, I've noticed that for some reason Unity is adding a pixel wide border to the texture that doesn't seem to bear any relation to the texture itself, although it is made up of a mixture of roughly the same colours.
In the above image it can most clearly be seen at the top border as a darker, single pixel wide line. Its also probably worth noting that the white background is actually transparent in the image. I have no idea why its doing this, because I've gone back and checked to make sure the image is saved properly, and there is no border showing when I look at it in GIMP. Any help would be greatly appreciated, Wibbs
(comments are locked)
|
|
You could take a look at this answer: Messy Alpha Problem - White around edges Setting the wrap mode to clamped sorted it - thanks
Mar 16 '11 at 04:49 PM
Wibbs 1
(comments are locked)
|
|
It's necessary if you don't premultiply your alpha. http://www.youtube.com/watch?v=sMR_R72bWzw There's not much point looking at RGB channels of a non-premultiplied image, unless there's a problem in the rendering that needs correcting.
(comments are locked)
|
|
Use TGA format. http://forum.unity3d.com/threads/136689-PNG-to-TGA-remove-artifacts-from-the-transparent-textures.
(comments are locked)
|

