Unity3D: Strange 1 pix white line between tiles on my 2D game
Asked Answered
C

4

6

My game have a tiled 2d map. This is a scene screenshot: enter image description here

I found when I move the camera vertically, there are strange white lines randomly appeared between randomly tiles, See: enter image description here

I don't know why....

PS: This is a pixel style 2d game, so my texture's filter mode is "Point".

PS: I uploaded this test scene at https://dl.dropbox.com/u/53858613/Web/Web.html , Hold the left mouse button , camera will move downwards, then you'll see white lines randomly.

Censor answered 19/3, 2013 at 1:42 Comment(1)
It's 2022 and still Unity can't render sprites.Europe
C
1

Change your materials shader to something more suited for 2D. Such as sprite/default.

I made a quick test project and changing the shader from "diffuse" to "sprite/default" solved the issue.

Canadianism answered 3/2, 2014 at 5:40 Comment(0)
B
1

What fixed it for me is setting the compression for my 2D spritesheet to point instead of bi-linear

Berserk answered 3/3, 2014 at 22:32 Comment(0)
D
-1

I do not see this issue on my machine with your example project. It seems just fine.

1) Make sure there is no white line in the actual image.

2) Make sure resolution options are not an issue.

3) I am not 100% sure but in the skybox the same happens with BLACK lines. Try and change the texture's texture mode to Clamp if possible. This might resolve the issue.

Hope this helps, -Smileynator

Didache answered 19/3, 2013 at 12:49 Comment(3)
You didn't see any white line when the camera moves?Censor
Indeed i did not see any on my machine. And if the clamp does not work, i am sorry but i have to dissapoint you :(Didache
I have the exact same problem with my project, though I'm using objects with SpriteRenderers instead of textures mapped to meshes. And running your example here I've got the same white lines. I'm looking into it at the moment, it seems like some sort of floating point precision problem. Try changing the way you calculate your texture mapping.Apposite
E
-1

According to this Tilemap tutorial by Brackeys, try turning off antialiasing under Edit>Project Settings>Quality>Anti Aliasing.

Esperanto answered 9/4, 2018 at 18:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.