- Home /
Black lines on the edge of cubes
My world consists of cubes placed next to each other. I've made simple camera movement script that is moving camera on X and Z axis. When I'm moving camera, some weird black lines are shown between cubes. Interesting thing is that they are shown only sometimes and only between cubes on the bottom side of camera. Does anyone know how can I fix it?
All cubes are sized 1x1x1 and they are placed directly next to each other so there is no gap between them.
Unity version: 2017.1.0f3
EDIT:// As I'm doing little research, it seems like the problem is with anti-aliasing, if I disable anti-aliasing completely, the problem disappear. If I max anti-aliasing to the max (8x MSAA) the problem persists but black lines are thinner. Problem is that I just can't disable anti-aliasing and consider this problem as fixed.
EDIT:// Guy with same problem with detailed information Thread
Answer by korbul · Jul 27, 2017 at 10:47 AM
If you are using the default AA from project settings->quality, disable it entirely and try the new post processing stack:
https://docs.unity3d.com/Manual/PostProcessing-Stack.html
Among many post processing effects you will find a much better anti aliasing solution.
I absolutely didn't know that something like that even exist. It works now perfectly with FXAA or TAA, thanks. (EDIT:// It is still happening but less often)
It looks like someday the postprocessing stack will become native to unity. However, the stack is a solution for post processing (after a frame has been rendered a shader is ran on the resulting image). Stuff like shadow settings or texture downscale will still remain in the current quality settings
I was wrong, the problem still persists but less often (both FXAA and TAA)
Answer by ShadyProductions · Jul 27, 2017 at 10:42 AM
Anti aliasing is just not a good thing in 2D tilebased games. Anti aliasing basically tries to smooth edge transition by blurring pixels, So that in picture it looks seemless, however in 2D games you will have to do this yourself to your sprites. Otherwise you get these weird black lines.
It's 3D, it's just from top view so you can see that lines from the best angle
Your answer
Follow this Question
Related Questions
Black horizontal lines in big streaks appear and sometimes flash in game when moving up and down? 0 Answers
How can i fix black lines? The material trick doesnt work. 0 Answers
I want only the edges visible on my cube? 2 Answers
Background sprite tile movement jerks and flashes with black lines 0 Answers