cesium
cesium copied to clipboard
Incorrect decoding of draco model with high quantization bit number
This was reported by Chris Wang on the forum.
The glTF file attached in this post was encoded with the following Draco parameters:
sOpt.pos_quantization_bits = 20;
sOpt.tex_coords_quantization_bits = 15;
And renders incorrectly in Cesium. Here's what it looks like in Bablyon:
And in CesiumJS:
@lilleyse believes this might be because the quantization is hardcoded in a few places in our Draco decoding.
@lilleyse believes this might be because the quantization is hardcoded in a few places in our Draco decoding.
Specifically I wouldn't be surprised if UNSIGNED_SHORT is hardcoded somewhere.
@lilleyse Hi Sean, will this be fixed soon? if not, can you tell me where is possibly hardcoded, so that I can fix myself.
When I set dequantizeInShader to false, the model is not distorted, and displays well. Hope it will help.
This also came up in https://github.com/AnalyticalGraphicsInc/gltf-pipeline/issues/511
Opened an issue in the Draco repo about whether it's possible to query the quantization bits without decoding to quantized form: https://github.com/google/draco/issues/573
@sanjeetsuhag and I talked offline - if there's no way to do it in the API, we'll need to dequantize in our own code.
@lilleyse Has this bug been fixed on the latest Cesium?
@Ben-Mack, no, still an open issue
Came up again in https://github.com/CesiumGS/cesium/issues/10516
Came up again in https://github.com/CesiumGS/cesium/issues/10977
Fixed in https://github.com/CesiumGS/cesium/pull/10979