Unity 6 weird shader behaviour

Has anyone had weird shader behaviour in unity 6? I recently converted my project over and the shaders are having issues that I can’t figure out why. I am generating meshes procedurally and only certain parts of the mesh display. It seems to be happening when I “refresh” the mesh because when I load the map from file it displays correctly.

I’ve also noticed that when I click around in the inspector that the mesh will display correctly randomly but when I move my mouse back into scene view parts of it will go back to not being visible.

There is nothing wrong with the mesh data, it shows correctly when loaded from file and after I edit the mesh and save it still displays fine. It’s only after I edit the mesh during runtime it has issues. This was all working fine in 5 LTS.

EDIT: Here is what I mean about it flickering. When I have a “submenu” open in the inspector and use my mouse scrollwheel to move up and down the mesh will flicker in the scene view between showing the full mesh and only showing parts of it. In the image you can see the outline of the full mesh but its only showing half lol.

EDIT2: Perhaps it’s something camera related? It seems to happen randomly at weird camera angles or if the camera is further away from the mesh. This only happens randomly though whenever I enter play mode.

EDIT3: Well, I’ll try recreating it in 5 LTS URP because it just doesn’t make any sense to me. On 5 LTS I was using BIRP but I’ll try URP there.

It looks like the geometry itself is fine since the outline gizmo is drawn correctly, so the issue likely lies with the shader.

Does the “flickering” only occur in the scene view?

Hey thx for reply Jackaa. It happens both in scene view and game view. I just created a new URP project in 5 LTS and it doesn’t happen there but I’m getting a different bug now. All of the geometry is transparent even though I don’t have any transparent shaders :joy: nothing but bugs today.

Perhaps its related to this, objects are transparent in the URP scene despite no transparent materials in use.

Ugh… it doesn’t make any fucking sense. God I hate gamedev sometimes.

Seem’s to be a bug then. Wish I could be more help!