cesiumjs-custom-shader

Installation
SKILL.md

CesiumJS CustomShader

Version baseline: CesiumJS 1.139 (includes 1.139.1 patch). All imports use ES module style.

CustomShader injects user GLSL into the Model / Cesium3DTileset / VoxelPrimitive rendering pipeline. It exposes glTF attributes, feature IDs, and EXT_structural_metadata to per-vertex and per-fragment code, and returns values through the built-in czm_modelVertexOutput and czm_modelMaterial structs.

Use this skill for writing the shader body. Use:

  • cesiumjs-materials-shaders — for Fabric Material, ImageBasedLighting, PostProcessStage (bloom, SSAO, FXAA, tonemapping).
  • cesiumjs-3d-tiles — for declarative per-feature coloring via Cesium3DTileStyle, and for VoxelPrimitive setup/configuration.
  • cesiumjs-models-particles — for Model.fromGltfAsync, animations, ModelFeature.getProperty().

Out of scope

  • Fabric Material for entity polylines/polygons/walls — see cesiumjs-materials-shaders.
  • PostProcessStage screen-space effects — see cesiumjs-materials-shaders.
  • ImageBasedLighting — see cesiumjs-materials-shaders.
  • Cesium3DTileStyle declarative JSON styling — see cesiumjs-3d-tiles. Do not combine with CustomShader on the same tileset.
  • Authoring EXT_structural_metadata / EXT_mesh_features in glTF — tooling concern, not runtime.

Minimal example

Related skills

More from cesiumgs/cesiumjs-skills

Installs
8
GitHub Stars
34
First Seen
Apr 25, 2026