I've been trying to determine which of my billboards are currently in view, and I have it working in 3D mode, but when I switch to 2D mode, it doesn't work. For 3D mode, I am using both the cullingVolume.computerVisibility function and occluder.isPointVisible. If I switch to 2D mode with the whole globe shown, I appear to get the same matching billboard count as when I'm in 3D mode, which is incorrect because in 2D mode, I am now seeing the entire earth on the screen, so all of my billboards should be visible.
At first I thought I just need to remove the occluder check, and just use the cullingvolume check, but that still doesn't work (I get far fewer billboards matching than I should). Here is my code for 2D mode:
var camera = viewer.scene.camera;
var frustum = camera.frustum;
var cullingVolume = frustum.computeCullingVolume(camera.position, camera.direction, camera.up);
var isInView = cullingVolume.computeVisibility(new Cesium.BoundingSphere(billboard.position, 0.0)) === Cesium.Intersect.INSIDE;
Do I need to change something related to my camera, or something else I'm doing wrong?