Slope fails for quantized tiles

35 views
Skip to first unread message

Davide Fiorello

unread,
Sep 24, 2019, 11:55:38 AM9/24/19
to cesium-dev
The slope and the aspect shaders don't work correctly then the tiles zoom is bigger than 12.

Checking the values in the shader it seems that the `materialInput.slope` value is always the max value (π/2)

A further investigation going through the code shows that the slope value is fixed to π/2 when the TerrainEncoding set the quantization is set to `TerrainQuantization.BITS12`

To be sure that the error wasn't caused by the terrain tiles I've moved the check value that move the `quantization` value from NONE to BITS12 



var SHIFT_LEFT_12 = Math.pow(2.0, 12.0);

to something like 

var SHIFT_LEFT_12 = Math.pow(2.0, 4.0);

This change make everything works correctly.

Then the issue is in the management of the quantized tiles. Maybe this is written somewhere in the documentation and it works as expected but I haven't found any reference about it.

The issue is in the 1.60 version with every browser I've tested.


Any thoughs?


Thanks
Davide Fiorello

Omar Shehata

unread,
Sep 26, 2019, 2:44:07 PM9/26/19
to cesium-dev
This sounds like it might be a bug in CesiumJS. Do you happen to have a Sandcastle example that recreates it? It would also be great to open a pull request to fix this (and the Sandcastle will help the reviewer verify the issue and the proposed fix)
Reply all
Reply to author
Forward
0 new messages