Rendering artifacts with anti-aliasing

Hi there,
I’ve been banging my head against the wall for a few days and I’ve run out of ideas.
I’m having some rendering artifacts with a very simple vertex color shader, these artifacts only show up with AA enabled.

I’ve verified the mesh multiple times (from Blender and within Unity) and there seems to be nothing weird.
As you can imagine when I rotate the camera I get flickering white lines between some edges, but the edges/vertices are not split (at least if I select a vertex/edge it acts like one) and I have no idea why this is happening.

This is especially noticeable when in Scene view, however it also happens (more intermittently and with a flickering nature) during play mode.

Shader: shader "Bridges/vertexColorsConstrasted"{ Properties{ } SubShader{ - Pastebin.com
House FBX: Dropbox

Any help is greatly appreciated.

Does the brown part of the house have top polygons? Because the artifacts don’t look white, they look exactly like the same color of the sides of the house. Maybe z-fighting?
You mentioned selecting the vertices to check for duplicated ones, but have you performed a weld operation? (Max artist) In Max after finishing a model I usually select the entire models vertices and perform a weld operation with the setting set real low .001 or something. Watching the vertex count - usually there is no change, but sometimes, very late at night - the vertex count might drop by 1 or 2.

Could you possibly perform a turn edge operation on the areas that are being effected, then re-export? Not a solution, but might be able to see something else happening when in Unity.

Yes, below the roof there is geometry which is brown, however it’s a decent distance away so I don’t think it’s Z fighting.
Also this happens on meshes that are one single “block” and don’t have anything under them, I just picked the house to show an example.

I’ve also tried welding vertices that are nearby and fixing up all the edges, but to no avail unfortunately :frowning:

Another example, this one is one a single mesh that has nothing “inside” it:

Ok so after a few more hours of investigating I figured out the issue, posting here in the rare event someone is facing the same issue.
I had a post-process script for .fbx files, it very simply would set a few basic parameters (smoothing angle, don’t optimize mesh, etc), but somehow that seemed to break the .fbx import process and cause the above issue.
Removing the post-processing script and re-importing all assets seems to have fixed the issue.
Script is below for the curious.

importer.generateAnimations = ModelImporterGenerateAnimations.None;
importer.importMaterials = false;
importer.normalImportMode = ModelImporterTangentSpaceMode.Calculate;
importer.normalSmoothingAngle = 0;
importer.optimizeMesh = false;

1 Like