You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Though CustomShaders is the new way to do GPU styling, we still are supporting the existing styling language. some parts of that must be handled on the GPU (e.g. per-point styling).
Some notes from @lilleyse excerpted from This branch describe when to use which type of styling:
Styles may be evaluated on the CPU or GPU depending on the style and the
types of properties involved. On the CPU styles are evaluated per-feature
and the color/show results are stored in a batch texture, which is later
applied on the GPU, either in the vertex shader or fragment shader.
For GPU styling the style is converted to a shader and executed in the
vertex shader or fragment shader directly. CPU styling is preferred.
In some cases a style may require both CPU styling and GPU styling, in which
case the style can't be applied and an error is thrown.
Situations where CPU styling is required:
Style uses language features not supported in GLSL like strings or regex
Style uses properties that are not GPU compatible like strings, variable-size arrays, or fixed sized arrays with more than 4 components
Style uses properties in JsonMetadataTable or BatchTableHierarchy
Style uses custom evaluate functions, see Cesium3DTileStyle#color
Situations where GPU styling is required:
Style uses per-point properties. Large point clouds are generally impractical to style on the CPU.
Style uses per-vertex properties. Per-vertex properties need to be interpolated before being styled.
Style uses feature texture properties
Style uses vertex attributes like position, color, etc
Style uses uniforms
Style references features in different feature tables
Point size style is used
Situations where the style must be applied in the fragment shader:
Primitive uses a feature ID texture
Style uses feature texture properties
Style uses per-vertex properties
Style uses interpolated vertex attributes
Style is evaluated on the CPU and vertex texture fetch is not supported
Situations where the style must be applied in the vertex shader:
Point size style is used
Since style variables aren't scoped there can be name collisions. They are
resolved in the following order of precedence:
Input semantics (e.g. POSITION)
Attributes (e.g. _TEMPERATURE)
Uniforms
Properties (for each item below, search by semantic first, then by property ID)
a. Feature
b. Tile
c. Group
d. Tileset
The text was updated successfully, but these errors were encountered:
Though
CustomShaders
is the new way to do GPU styling, we still are supporting the existing styling language. some parts of that must be handled on the GPU (e.g. per-point styling).Some notes from @lilleyse excerpted from This branch describe when to use which type of styling:
The text was updated successfully, but these errors were encountered: