Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Billboard ordering incorrect when using disableDepthTestDistance #6838

Open
hpinkos opened this issue Jul 24, 2018 · 0 comments
Open

Billboard ordering incorrect when using disableDepthTestDistance #6838

hpinkos opened this issue Jul 24, 2018 · 0 comments

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Jul 24, 2018

When the disableDepthTestDistance is greater than the distance from the camera to the billboard, the wrong billboard renders on top. In this example, the blue billboard has a greater height than the red billboard so it should be visible. However, the red billboard is instead.

var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;
var camera = scene.camera;
var billboards = scene.primitives.add(new Cesium.BillboardCollection());
billboards.add({
    image : '../images/Cesium_Logo_overlay.png',
    color: Cesium.Color.RED,
    position : Cesium.Cartesian3.fromDegrees(0, 0),
    disableDepthTestDistance: Number.POSITIVE_INFINITY
});

billboards.add({
    image : '../images/Cesium_Logo_overlay.png',
    color: Cesium.Color.BLUE,
    position : Cesium.Cartesian3.fromDegrees(0, 0, 100),
    disableDepthTestDistance: Number.POSITIVE_INFINITY
});

camera.position = Cesium.Cartesian3.fromDegrees(0, 0, 4000);
camera.direction = Cesium.Cartesian3.negate(Cesium.Cartesian3.UNIT_X, new Cesium.Cartesian3());
camera.up = Cesium.Cartesian3.clone(Cesium.Cartesian3.UNIT_Z);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant