Mesh overlay with GridMaterial and negative zOffset

Hello,

today I noticed some unexpected behaviour (possibly a bug) about the GridMaterial. As soon as I set zOffset on a mesh that uses it to a number smaller than -1 then the overlay stops working.
Is it an issue with the zOffset or maybe the overlay? Or is there some forbidden combination that we should know about? :slight_smile:

Repro here (if you change the zOffset to > -1 the overlay is rendered again):

Thank you and have a nice day.

You should set the same zOffset to the outline renderer if you want the regular rendering not overwrite the overlay. You can do it with scene.getOutlineRenderer().zOffset = 2;. Note that the value must be negated! So, if you use -2 in the material, you should use 2 (or more):