Globe Materials - Custom Shader


does anyone has experiences with globe materials.

Is it possible to use a customShader for GlobeMaterials or could I specify an area of the globe for which I can use a GlobeMaterial, i.e. visibility, viewshed



Hi @Ruediger_Brand,

Thank you for bringing the community your question. CustomShader is not supported for the globe (only 3D Tiles or models).

Can you please share more information on what you mean by visibility and viewshed?

Looking forward to learning more.


You could create a Material instance and use it with viewer.scene.globe.material = material. See Source/shaders/GlobeFS.glsl to go deeper.
If you want to only show a part of globe, maybe you could use clippingPlanes for globe.

1 Like

Hi @Gu-Miao! Great suggestion, thanks :rocket:

@sam.rothstein @Gu-Miao


I think about doing visibility calculations, i.e. calculation of a viewshed in a shader. We use a vertex-shader for visibility calculations in a 3D-Tileset, so the idea was -could I use this for the globe/terrain as well. Our inspiration was the elevation/slope-Material