Hi,
I have a question on displaying polygons (well, actually 'bodies') in
Cesium, which are transparent, but which have a somewhat peculiar
property in terms of depth tests.
on one side, these bodies should be 'covered' by the terrain, thus, they
should be part of the depth tests.
OTOH, as they are semi-transparent (alpha value of 0.4), I'd expect the
various bodies to be shown 'behind' or 'inside' other bodies.
now, what I have put together, which uses the Cesium Polygon objects
modified so that:
upperPoly._rs = scene.getContext().createRenderState( {
depthTest : {
enabled : true,
func : Cesium.DepthFunction.LESS
},
blending : Cesium.BlendingState.ALPHA_BLEND
});
the interesting result is that while the it does the depth test properly
against the terrain, and the terrain itself is seen through the
semi-transparent polygons - the polygons / bodies behind / inside are
filtered out.
to see an example, see here: http://akos.maroy.hu/~akos/c/ - where there
is a 'red box' in the camera focus. but if you move 'up', it will be
hidden by the blue body that encompasses it.
(even more interestingly I've seen this working properly once)
what would be the proper way to achieve the see-through effect desired here?
Akos