Can i enable depthTestAgainstTerrain for just 1 or a few geometries?

Turing on depthTestAgainstTerrain has a few sideeffects in my scene so i would rather only enable depth test for just 1 or a few geometries. I have seen that option disableDepthTestDistance on billboards, do geometry objects have something similar? Could i use depthFailAppearance?
More precisely i have a wireframe on on a sphere and it can be sen through terrain in some instances.

In principle, yes the answer is using depthFailAppearance.

What kind of geometry are you adding? Are you using the entity API or primitive API? There’s a few open issues about adding support for depth fail materials to more geometry types here: https://github.com/CesiumGS/cesium/issues?q=is%3Aissue+is%3Aopen+depthFailMaterial

Thanks, its just a sphere so open to anything that will work?
So if half the sphere is below terrain it will use depthFailAppearance for one half? Handy…

I cannot see depthfail material doing anythig is there an example somewhere maybe? I have slightly exotic case where geometry behind the terrain is visible through it when they shouldnt. Is the render property monkey patch an option for this https://github.com/CesiumGS/cesium/issues/5333#issuecomment-413185541? I saw people turn depthtest off but i would need it on