cesium icon indicating copy to clipboard operation
cesium copied to clipboard

Support occurrences statistic for ENUM metadata in Custom Shaders

Open jjhembd opened this issue 3 years ago • 0 comments

Metadata statistics from a 3DTiles tileset are currently stored as constants in a metadataStatistics struct. The values of this struct can be accessed in a Custom Shader from the main vsInput or fsInput structs, as follows:

float minValue = vsInput.metadataStatistics.metadataProperty.minValue;
float mean = vsInput.metadataStatistics.metadataProperty.mean;

The current struct does not support ENUM-type metadata. The schema specifies an occurrences statistic for ENUM-type properties. The occurrences statistic is a dictionary keyed on the enum name, containing the number of occurrences of that enum.

As previously discussed, occurrences should appear in the metadataStatistic struct as a new struct keyed on the enum name.

jjhembd avatar Sep 19 '22 15:09 jjhembd