The fun never stops.
So, it seems that layering (at least as discussed as above) does not work.
RenderPassConfig rpc;
RenderPass rp;
SkySphere ss;
ss = myXith.this.createSkySphere();
ss.setLayeredModeForced(false);
ss.setUnlayeredModeForced(true);
myXith.this.xithEnv.addRenderPass(ss);
rpc = new BaseRenderPassConfig(org.xith3d.render.RenderPassConfig.DEFAULT_CAMERA_MODE);
rp = new RenderPass(myXith.this.groundBranchGroup, rpc);
rp.setLayeredModeForced(true);
rp.setUnlayeredModeForced(false);
myXith.this.xithEnv.addRenderPass(rp);
rpc = new BaseRenderPassConfig(org.xith3d.render.RenderPassConfig.DEFAULT_CAMERA_MODE);
rp = new RenderPass(myXith.this.geomBranchGroup, rpc);
rp.setLayeredModeForced(true);
rp.setUnlayeredModeForced(false);
myXith.this.xithEnv.addRenderPass(rp);
This still fails to Z-sort correctly, regardless of which combination of setLayered and setUnlayered I use (and I've tried all 8, I believe). I've also tried setting the renderer to use layering and to not use layering, and still no dice.
The results of the above, by the way, are a sky sphere in the background, as desired. In front of that is a large flat green plane I use for the ground, and then my foreground geometry always in front of the both the plane and the sphere, even when it should nominally be behind the ground plane (e.g., seen from below ground it should be occluded).
I'm unsure, but do we know for certain that this code works? There don't appear to be any unit-tests/samples in the SDK.