Removing a point entity with the height reference property set to NONE causes a phantom entity to appear in the middle of the screen. This entity has no id and doesn't show up in the collection, so it can't be removed, unless a new point entity is added to the collection, which makes it go away.
Depending on the camera position, the entity disappears and reappears. Setting heightReference to CLAMP_TO_GROUND or RELATIVE_TO_GROUND works as expected.
Thanks in advance!
Hi @floonone, thanks for including the Sandcastle example! However, everything seemed to work as expected for me. Can you paste a screen shot of what you're seeing?
Here it is

I've managed to reproduce it in Firefox 62 and Chrome 69 on Ubuntu 16.04, but wasn't able to in Firefox 62 on Windows 10. Could it be a driver or a WebGL misconfiguration issue?
Hmm. Yeah, I'm running Windows and couldn't reproduce this. If your drivers are out of date, that's one thing that could cause an issue.
@mramato can you see if you can reproduce this on your linux machine?
I can't seem to reproduce this issue either, I tried both Firefox 62 and Chrome 69 on Kubuntu 18.04. I agree this could be a graphics driver, especially since the point gets all floaty and detached from the scene. Is there any output in the console? What video card are you using?
Can you visit http://webglreport.com/ on Chrome 69 on the offending machine and paste the results of the WebGL 1 report (just select all/copy and GitHub will make a pretty table when you paste it).
Is there any output in the console? What video card are you using?
No console output. I'm using a Nvidia GeForce GT 730, using Nvidia binary driver version 384.130.
Can you visit http://webglreport.com/ on Chrome 69 on the offending machine and paste the results of the WebGL 1 report (just select all/copy and GitHub will make a pretty table when you paste it).
Here it is:
| Info | |
| ------------------------- | -------------------------------------------------------------------------------------------------------- |
| Platform: | Linux x86_64 |
| Browser User Agent: | Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36 |
| Context Name: | webgl |
| GL Version: | WebGL 1.0 (OpenGL ES 2.0 Chromium) |
| Shading Language Version: | WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) |
| Vendor: | WebKit |
| Renderer: | WebKit WebGL |
| Unmasked Vendor: | NVIDIA Corporation |
| Unmasked Renderer: | GeForce GT 730/PCIe/SSE2 |
| Antialiasing: | Available |
| ANGLE: | No |
| Major Performance Caveat: | No |
| Supported Extensions |
| ------------------------------------- |
| ANGLE_instanced_arrays |
| EXT_blend_minmax |
| EXT_color_buffer_half_float |
| EXT_frag_depth |
| EXT_shader_texture_lod |
| EXT_texture_filter_anisotropic |
| WEBKIT_EXT_texture_filter_anisotropic |
| EXT_sRGB |
| OES_element_index_uint |
| OES_standard_derivatives |
| OES_texture_float |
| OES_texture_float_linear |
| OES_texture_half_float |
| OES_texture_half_float_linear |
| OES_vertex_array_object |
| WEBGL_color_buffer_float |
| WEBGL_compressed_texture_s3tc |
| WEBKIT_WEBGL_compressed_texture_s3tc |
| WEBGL_compressed_texture_s3tc_srgb |
| WEBGL_debug_renderer_info |
| WEBGL_debug_shaders |GeForce
| WEBGL_depth_texture |
| WEBKIT_WEBGL_depth_texture |
| WEBGL_draw_buffers |
| WEBGL_lose_context |
| WEBKIT_WEBGL_lose_context |
| Vertex Shader | |
| ------------------------------ | ----------------- |
| Max Vertex Attributes | 16 |
| Max Vertex Uniform Vectors | 1024 |
| Max Vertex Texture Image Units | 32 |
| Max Varying Vectors | 31 |
| Best float precision | -2127, 2127 |
| Rasterizer | |
| ------------------------ | ------------ |
| Aliased Line Width Range | [1, 10] |
| Aliased Point Size Range | [1, 189.875] |
| Fragment Shader | |
| ---------------------------- | ----------------- |
| Max Fragment Uniform Vectors | 1024 |
| Max Texture Image Units | 32 |
| float/int precision | highp/highp |
| Best float precision | -2127, 2127 |
| Framebuffer | |
| ----------------------- | -------------- |
| Max Color Buffers | 8 |
| RGBA Bits | [8, 8, 8, 8] |
| Depth / Stencil Bits | [24, 8] |
| Max Render Buffer Size | 16384 |
| Max Viewport Dimensions | [16384, 16384] |
| Transform Feedback |
| ------------------ |
| Coming in WebGL 2 |
| Textures | |
| -------------------------------- | ----- |
| Max Texture Size | 16384 |
| Max Cube Map Texture Size | 16384 |
| Max Combined Texture Image Units | 192 |
| Max Anisotropy | 16 |
| Uniform Buffers |
| ----------------- |
| Coming in WebGL 2 |
Also reported by @cpt-chewieeee in #7045. See #7045 for an example using clustering.
@cpt-chewieeee was also seeing this issue on a linux machine, see https://github.com/AnalyticalGraphicsInc/cesium/issues/7045#issuecomment-422521911 for more details
@bagnell do you have a linux machine you can try to reproduce this on?
@tfili do you still have your linux machine?
Hi,
I have also encountered this issue on my linux machine using Electron.
Version string from Electron is . .
{ http_parser: '2.8.0',
node: '10.2.0',
v8: '6.6.346.32',
uv: '1.20.3',
zlib: '1.2.11',
ares: '1.14.0',
modules: '64',
nghttp2: '1.29.0',
napi: '3',
openssl: '1.1.0h',
electron: '3.0.0-beta.3',
chrome: '66.0.3359.181' }
Cesium version is 1.51
Cheers
Thanks @supercamel! I'm not sure how soon we're going to be able to look into this, but we'll give you and update when we can
As I stumbled over the same problem, just some system info from me, too:
Using Ubuntu 18.04 with Chrome 70.0 and latest available graphics drivers from Nvidia (415.18) with a GeForce GTX 660 Ti.
I can provide some vague additional information:
We use point entities with some functionality attached, so we check with pick/drillPick methods if a point entity is clicked. The "phantom points" seem to still trigger this, as the whole website stops working when I click one of them. Unfortunately I can't narrow this down and provide an example right now because I don't know what really is causing this.
I also managed to hide the "phantom points" alongside other primitives by setting the corresponding boolean to false (in viewer.scene.primitives).
So, long story short: It seems to not just be a graphical glitch. Cesium seems to be able to detect that something is there and the "phantom points" are still somehow connected to the scenes primitives.
Additionally the "phantom points" sometimes disappear, depending on which part of the globe I am looking and how far/near I zoomed in. Here's an example gif I already posted in the issue (#7381) I created before finding this one. In this example the "phantom point" is only appearing after zooming in and out:

As I started to dig around a bit, I'll just leave my two cents here. Maybe it can at least give some tips if someone else wants to work on it (as I don't have the time right now unfortunately) ;)
Point entites _without_ a height reference are handled as PointPrimitives, while point entities _with_ a height reference are handled as Billboards. This is very likely the reason for the different behaviour of points that is mentioned here.
I think the problem does not lie in the methods to remove the entities. More likely it really is some problem in the rendering part (or the drivers).
One thing I've noticed is, that the phantom entity does not appear when removing point.show = false in EntityCluster.prototype.removePoint() from _Source/DataSources/EntityCluster.js_, instead the point will be shown where it was before on the globe as if it hasn't been removed (which is expected behaviour, i think).
I also modified the PointPrimitiveCollection Vertex Shader (_PointPrimitiveCollectionVS.glsl_). The phantom entity is influenced by some shader values (e.g. hard coding the color to green will make the phantom entity green) while it's not influenced by some other values (e.g. hard coding show to 0 will make the real entity disappear but the phantom entity is still displayed after removing the real one).
I am guessing that the phantom entity is influenced by the values that are outputted by the vertex shader.
Edit: Even though it looks like there is no primitive connected to the phantom entity, calling viewer.scene.primitives.show = false makes the phantom entity disappear.
viewer.scene.pick() and viewer.scene.drillPick() return _undefined_/an empty array when called with the screen position of the phantom entity (as expected when there really is no primitive anymore). But viewer.scene.pickPosition() also returns _undefined_ on this screen position (which is causing the problem I described in my comment above, i think). So the phantom entity at least is messing with the depth buffer (depth is calculated as 0).
Thank you for this detailed write up @UniquePanda! That should help our graphics developers narrow in on the problem.
I can absolutely reproduce this on Linux (Nvidia) and also via Cesium ion (the tileset position tool ends up with a large phantom point).
I don't think removing the point in necessary to recreate the issue. In our application we were able to cause this by changing the 'show' variable.
I am still testing it but a possible work-around is to set the color to have an alpha of 0.0 and hide it via that method. Initially, that seems to be working.
This is definitely a video driver specific bug/issue on linux, which means it may not be our fault (or possible to workaround). Hopefully that's not the case but we need to dig in further to know for sure. The reason I know this is because I can reproduce it every time under the same hardware if I toggle back and forth between my intel and nvidia GPUs.
This was fixed in https://github.com/AnalyticalGraphicsInc/cesium/pull/8054 which went out with the 1.61 release.