-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Polyline shifting artifact with logarithmic depth buffer #7852
Comments
@lyhkop can you post a full Sandcastle example that we can run to replicate this issue? Screenshots/gifs help too to explain exactly what you mean. |
If I'm reading this right, the intersection point is sliding several meters? (It goes from being on one side of the extruded part of the building that's closest to the street, to the other side). I'm unable to recreate this in a Sandcastle example though. Here's my Sandcastle. Another way to confirm this is to place a sphere at this point and compare it to the line: Can you please try this and let me know the result? If you are able to recreate this issue using this tileset in Sandcastle this will help a lot in determining the issue and fixing it. |
thank for your reply! i jsut delete the first point in your Sandcastle code,like this: |
I'm having a very similar issue with my polylines, although I can't provide a sandbox example as the terrain tiles are generated and served by my application in CesiumTerrainProvider format but the polyline is not testing correctly against the terrain.
|
Ok, I definitely see what you mean here. @wtfgecko thanks for providing the additional case. I think this can be worked around by doing a raycast to get the actual point of intersection and adding that point to the polyline, which is why it didn't happen in my first case. @likangning93 do you have any insight here? Is this expected behavior? |
This might be an artifact of linearly interpolating log depth, I can't seem to reproduce the effect with |
That fixes it for my issue. I'm reading in to the consequences of turning this off at the moment, but I would assume this isn't an intended consequence of the feature. As per https://cesium.com/blog/2018/05/24/logarithmic-depth/ |
I believe this indeed a bug, and I've labelled it as such.
I think you should be fine turning this off for now. You might see a slightly lower performance or you may need to adjust the near/far planes if you're seeing any Z-fighting (see https://cesiumjs.org/Cesium/Build/Documentation/Camera.html?classFilter=Camera). |
when i use this code to add a line entity。
The point of intersection with b3dm data will change when camera move! I think the causes of this problem is that we change the position in screenspace but depth is not change!
The text was updated successfully, but these errors were encountered: