Work around Cesium 3D tiles regression #59040
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In #58591 @nirvn reported that a commit from that PR (89a23b7) broke viewing Google 3D terrain layers. This was caused by the removal of some tiled-scene-specific tile culling code, which isn't conservative enough and was rejecting low-zoom-level Quantized Mesh tiles (e.g. zoom level 0 which covers the whole world). I also thought
QgsChunkedEntity
would not request loading of these tiles anyway, but I was clearly wrong.As a quick fix, I reintroduced that code, but only for Cesium 3D tile layers, where it apparently didn't cause problems before.
Hopefully this will be improved in the future so that the code path will be good enough for Cesium 3D tiles and Quantized Mesh tiles without any case-by-case fixes, possibly with qgis/QGIS-Enhancement-Proposals#301.