cesium
cesium copied to clipboard
Support occurrences statistic for ENUM metadata in Custom Shaders
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.