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 · 1 comment
Open

Billboard ordering incorrect when using disableDepthTestDistance #6838

hpinkos opened this issue Jul 24, 2018 · 1 comment

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);
@lukemckinstry
Copy link
Contributor

A problem reported by a user on the forums appears to be the same underlying problem described in this issue https://community.cesium.com/t/disabling-depth-testing-against-3d-tiles-for-billboards/36839/6

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

2 participants