CesiumGS / cesium-native

Apache License 2.0
435 stars 214 forks source link

There seems to be a bug in TestSubtreeAvailability? #587

Closed insar-dev closed 1 year ago

insar-dev commented 1 year ago

I think that bufferSize should be (1 + 4 + 16 + ...+ maxTiles) / 8. For example, for 3 levels tree, there are 21 tiles, bufferSize should be 3 NOT 2.

image

insar-dev commented 1 year ago

I think std::ceil(maxTiles / 8) is wrong too, it should be std::ceil(maxTiles / 8.0) 8 -----> 8.0

kring commented 1 year ago

Thanks @insar-dev, I agree. The 3DTILES_implicit_tiling spec has formulas that can be used to compute the necessary values: https://github.com/CesiumGS/3d-tiles/tree/main/extensions/3DTILES_implicit_tiling#availability-bitstream-lengths

Would you be interested in opening a pull request with the fix?

insar-dev commented 1 year ago

@kring i have committed pull request.

kring commented 1 year ago

Re-opening this until #588 is merged.