Object is strangely flickering..

3010012--224559--flickering.gif 3010012--224560--flickering_2.gif

Information:
tile’s GameObject scale is Vector3.one(1, 1, 1).
The distance between tiles is 1.
This is originally a 32 bit texture game, but the GIF tool was made into low quailty. (it’s not exactly 16bit. thx jvo3dc)
plz consider this.

Question:
Outline(it just mesh & texture. not a shader things) of these tiles are very flickering. how can I fix it?
(At first I thought this was a z-fighting problem. then I try to control near-far plane values but not working.)

and, why are all the tiles’ textures blinking?

Changing the clip planes doesn’t guarantee a solution to z-fighting. The best solution in my opinion is to actually have 0 distance between the two objects. Any small difference can lead to z-fighting, but rendering the exact same object twice won’t. You do have to make sure the vertex shader is exactly the same for the part that calculates the clip space position of the vertices.

Offtopic: GIF uses a 8 bit index (or palette) with 24 bit colors. 16 bit and GIF don’t really make sense.

I knew now about GIF details. Thank you very much for sharing your knowledge.
So are you sure this is z-fighting? If so, I will look for more ways in that direction.

I’m not sure it’s z-fighting, but I am sure that changing clip planes doesn’t always solve it. It’s a bit hard to see on the gif. Maybe turn it in to an actual video?

This is recorded with everyplay. If you look close, you will see some lines are flickering in the edges.

ex)
3012297--224756--upload_2017-3-30_12-57-58.png

Marked white line appears, and disappear when camera moves.

3012297--224758--upload_2017-3-30_12-59-53.png

These too.

Also tiles are flickering too much. any idea?

3012297--224751--upload_2017-3-30_12-56-36.png

Well, if the lines are separate objects, z-fighting. You should always try to avoid these type of overlay solutions. These lines can simply be applied to the boxes by a texture.

Actually, it is simple cube,

3012592--224784--upload_2017-3-30_19-4-44.png

and textured / and uv-mapped like below. Lines are part of texture.

screenshot taken in blender.

and finally, scale (size) and positions are all integer, so it does not have to do with overray at all (at least I think)

so I dont think this is z-fighting problem. are you sure about that? thanks.



In that case it should not be z-fighting. What are the import settings on the texture?

3013780--224919--upload_2017-3-31_14-44-34.png

all tile’s textures are imported with this setting - using unity 5.5.2p4.

On the white cubes, that’s probably an artifact of MSAA causing it to sample the texture outside the UVs. You probably want to fill the white area with the outline color, and maybe increase the gutter between faces.

The way MSAA works is it tests if a triangle is overlapping one or more of N subpixel points (i.e.: 4x MSAA tests 4 subpixel locations), but it still renders at the center of the pixel. That means it’s possible the position being rendered is actually outside the surface of a triangle.

Actually, I was testing with MSAA off and tried most of the ways - like fill white area with outline color, or fill with transparent, increase gutter, reduce gutter, add some paddings with outline color, transparent, white and etc. so Im out of idea :frowning: