I have some complicated 3D plots that rendered fine in Mathematica 11. With Mathematica 12, however, objects are not drawn in the right order and objects that should be hidden appear in front. This can be seen in the following simplified example:
Show[
Graphics3D[{FaceForm[Yellow],
Polygon[{{-1, -1, 0}, {-1, 1, 0}, {1, 1, 0}, {1, -1, 0}}]}],
Graphics3D[{Thick, Black, Line[{{-1, 0, -0.1}, {1, 0, -0.1}}]}],
PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}},
ViewPoint -> {1.6, -1.7, 2.45},
ViewVertical -> {-0.12, 0.13, 0.98}
]
Since this may be macOS specific (or even Mojave 10.14.5 specific) let me describe what is wrong: the black line is only partly hidden by the yellow polygon and it actually appears to go through the polygon. The viewpoint is important. With other viewpoints objects are rendered correctly.
This is clearly a rendering bug. Is there any idea on how to work around this bug in a reliable way?
SystemInformation[]
, and information about your computer (model, OS version, graphics card, etc...) $\endgroup$