CesiumGS / CesiumGS/cesium-native
Consistent ordering rules for vector tiles rasterization
- Dominant language
- C++
- Stars
- 623
- Forks
- 277
- PR merge metrics
- No merged PRs in 30d
Description
Currently, when rasterizing a vector tile in the `VectorTilesRasterOverlay`, each geometry tile is rasterized successively to the canvas. This can cause some weird overlapping artifacts. Take a look at this example from the [PhillyStressTest](https://github.com/user-attachments/files/29015144/PhillyStressTest.zip) dataset I made for benchmarking:
The order of tiles in `tilesToRender` in this example starts at the top left tile and works its way right and down. The ordering of elements within a geometry tile is consistent: first polygons, then lines, then points. But because each geometry tile is drawn after all the elements in the previous geometry tile have been drawn, you can see that points here are being cut off at the edges of geometry tiles.
This is likely pretty easy to fix, by doing three passes over the list of `tilesToRender` to handle each geometry type.
Contributor guide
Research direction
Locate VectorTilesRasterOverlay and trace how tilesToRender is processed; start by reading the rasterization path and checking the PhillyStressTest example. Done means geometry is rendered with consistent ordering across tile boundaries, so points and other elements no longer show the reported overlapping artifacts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100