cesiumjs-custom-shader
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 FabricMaterial,ImageBasedLighting,PostProcessStage(bloom, SSAO, FXAA, tonemapping).cesiumjs-3d-tiles— for declarative per-feature coloring viaCesium3DTileStyle, and forVoxelPrimitivesetup/configuration.cesiumjs-models-particles— forModel.fromGltfAsync, animations,ModelFeature.getProperty().
Out of scope
- Fabric
Materialfor entity polylines/polygons/walls — seecesiumjs-materials-shaders. PostProcessStagescreen-space effects — seecesiumjs-materials-shaders.ImageBasedLighting— seecesiumjs-materials-shaders.Cesium3DTileStyledeclarative JSON styling — seecesiumjs-3d-tiles. Do not combine with CustomShader on the same tileset.- Authoring
EXT_structural_metadata/EXT_mesh_featuresin glTF — tooling concern, not runtime.
Minimal example
More from cesiumgs/cesiumjs-skills
cesiumjs-camera
CesiumJS camera control - Camera, flyTo, lookAt, setView, ScreenSpaceCameraController, CameraEventAggregator, flight animation. Use when positioning the camera, creating flyTo animations, constraining user navigation, tracking entities, or converting between screen and world coordinates.
14using-cesiumjs-skills
Use when starting any conversation involving CesiumJS development - provides orientation on available domain skills and how they activate
14cesiumjs-spatial-math
CesiumJS spatial math - Cartesian3, Cartographic, Matrix4, Quaternion, Transforms, Ellipsoid, BoundingSphere, projections, coordinate conversions. Use when converting between coordinate systems, computing positions on the ellipsoid, performing spatial intersection tests, building model matrices, or working with geographic projections.
14cesiumjs-viewer-setup
CesiumJS viewer setup - Viewer, CesiumWidget, widgets, Ion token, Scene configuration, SceneMode, factory helpers, geocoders, platform services. Use when initializing a CesiumJS application, configuring viewer widgets, setting Ion access tokens, creating default terrain or imagery, or bootstrapping a 3D globe.
14cesiumjs-imagery
CesiumJS imagery layers - ImageryProvider, ImageryLayer, ImageryLayerCollection, WMS, WMTS, Bing, OpenStreetMap, ArcGIS, Mapbox, tile discard policies. Use when adding or swapping base map layers, configuring imagery providers, layering multiple map sources, or creating split-screen imagery comparisons.
13cesiumjs-core-utilities
CesiumJS core utilities and networking - Resource, Color, Event, Request, RequestScheduler, error handling, helper functions, feature detection. Use when fetching remote data, managing HTTP requests, working with colors, handling events, debugging errors, or using utility functions like defined, clone, or buildModuleUrl.
13