SkillsReviewed · CesiumGS

CesiumJS CustomShader skill

CesiumJS CustomShader is a coding-assistant skill for developers customizing CesiumJS 3D scenes, but its tileset support uses an experimental interface. It provides GLSL shader guidance, an API reference and seven examples covering models, 3D tiles and voxels, with CesiumJS 1.144 as its declared baseline.

Researched 16 Nov 2026

In short.

CesiumJS CustomShader is a coding-assistant skill for developers customizing CesiumJS 3D scenes, but its tileset support uses an experimental interface. Its main value is detailed guidance on shader inputs, coordinate spaces, transparency, feature IDs and structural metadata. Seven examples demonstrate specific effects rather than a complete application: they require an existing viewer and accessible assets. The declared baseline is CesiumJS 1.144. Actual rendering, performance and assistant compatibility are not assessed; the source's compile-testing claim has no accompanying test results.

Researched and written by an AI model and checked by a second AI model. How it works

Covers all eleven files in skills/cesiumjs-custom-shader at revision 5f4792c09c4496f214ba9679cac6d7b3b014dcdd: SKILL.md, REFERENCE.md, seven numbered JavaScript examples, examples/README.md and examples/_sandcastle-template.html, plus the repository-root LICENSE. Excludes sibling skills, the wider repository, cited upstream CesiumJS implementation and changelog files, external sample assets and the live Sandcastle environment. Original source locations are preserved. No code was executed; rendering, performance, live asset availability and assistant-host compatibility are unassessed.

The overview

Identity

The resource is the cesiumjs-custom-shader folder in CesiumGS/cesiumjs-skills. It contains assistant instructions in SKILL.md, a companion REFERENCE.md, seven JavaScript examples, an examples README and an HTML scaffold. The fixed source version is available at [https://github.com/CesiumGS/cesiumjs-skills/tree/5f4792c09c4496f214ba9679cac6d7b3b014dcdd/skills/cesiumjs-custom-shader].

Its purpose is authoring shader bodies for CesiumJS CustomShader. CesiumJS supplies the rendering engine; this folder supplies instructions and examples rather than a standalone graphics application.

Assessment

The strongest feature is its concentration of specific API rules alongside small examples. It explains several failures that can otherwise be difficult to diagnose: ignored transparency changes, incorrect coordinate spaces, unsigned metadata type mismatches and displaced geometry disappearing during visibility culling.

It fits an existing CesiumJS project that needs custom rendering logic. Beginners will need additional help with viewer initialization, JavaScript modules and shader fundamentals. There is no measured evidence that loading this skill improves an assistant's accuracy or development speed.

Who it is for

The intended users are developers and coding assistants implementing custom appearances for glTF models, data-driven 3D tiles or voxel volumes in CesiumJS. Examples include coloring building features by ID, mapping metadata to colors and animating a model's surface.

Beginners get concrete starting points, but need basic GLSL knowledge: vertex shaders can move geometry points, while fragment shaders control material values used to render surfaces. Experienced developers get stage-specific input tables, metadata rules and migration notes. Supported assistant products and skill-loading compatibility are not documented in this folder.

Capabilities

The guidance covers attaching CustomShader to Model, Model-backed Cesium3DTileset content and the restricted VoxelPrimitive shader interface. It explains uniforms supplied from JavaScript, values passed between shader stages, material replacement, lighting choices, feature IDs and structural metadata.

The seven snippets demonstrate a pulsing diffuse tint, scrolling texture coordinates, feature-ID coloring, forced transparency, normal-based vertex displacement, a metadata color ramp and voxel shading. The reference adds enum tables, shader structures, automatic uniforms and coordinate-space validation rules.

Using it

Requirements

The declared version baseline is CesiumJS 1.144, and examples use ES module imports from cesium. Each snippet expects a viewer variable that it does not initialize. A surrounding CesiumJS application, suitable graphics environment and reachable model, texture or tileset assets are therefore needed.

Asset contents matter. The texture example reads texCoord_0, displacement reads normalMC, feature coloring requires feature IDs, and metadata examples require the named properties in their datasets. The voxel example expects a provider exposing metadata property a. Browser and GPU minimums, a complete application dependency manifest and assistant-specific installation requirements are not supplied.

How it works

CustomShader inserts user-written GLSL into CesiumJS rendering stages. vertexMain changes vertex output such as position; fragmentMain changes material fields such as diffuse color and alpha. The default MODIFY_MATERIAL mode runs after the original material stage and before lighting. REPLACE_MATERIAL skips the original material stage.

Uniforms carry JavaScript values into shaders, and setUniform updates them. Varyings pass values from vertex processing to fragment processing. CesiumJS scans shader text for referenced inputs, so the documented parameter names and direct field access matter; aliases can prevent required fields from being detected.

Voxel shaders operate on samples along a viewing ray, whose contributions are combined into the final pixel. Their available inputs differ from model shaders.

Setup

Obtain the original folder with SKILL.md, REFERENCE.md and examples, retaining the repository's LICENSE. Assistant-specific loading steps are unknown. For application use, initialize a CesiumJS viewer, resolve the asset URLs, construct a CustomShader and attach it to the appropriate model, tileset or voxel primitive.

The examples README points to [https://sandcastle.cesium.com/], but the supplied snippets omit viewer initialization and the HTML scaffold contains only styling and containers. Additional surrounding code is needed.

The README says all assets use public raw GitHub URLs, while the model snippets actually use relative ../../SampleData paths. Those examples depend on a matching asset layout unless their paths are changed. The tileset and voxel snippets use absolute GitHub URLs.

Example

In examples/06-metadata-ramp.js, a tileset shader reads fsInput.metadata.insulation. The example describes this property as normalized UINT8, delivered as a floating-point value from zero to one. It uses that value to interpolate between blue and red with lighting disabled, illustrating how existing asset data can drive surface color.

The example assumes the asset already contains insulation metadata; it does not create or author that data. Its actual rendered appearance and the current availability of the remote dataset are not assessed.

For a simpler starting point, examples/01-diffuse-tint.js updates a time uniform after each scene update and blends the model's diffuse color toward an orange tint.

Assessment & evidence

Limitations

The skill documents Cesium3DTileset.customShader as experimental and warns that combining it with Cesium3DTileStyle can produce undefined behavior. Tileset support applies to Model-backed content; native I3S and other content formats are unaffected.

Several rendering constraints require attention. Writing alpha on an opaque source material under INHERIT does not enable transparency. Moving vertices does not update their bounding sphere, so displaced geometry can disappear during visibility culling. Cube-map uniforms are rejected, and missing attributes can lead to defaults or disable the custom shader stage for an affected primitive.

VoxelPrimitive accepts only fragment shader logic. Its attribute inputs are limited to positionEC and normalEC, with no feature IDs or metadataClass; metadataStatistics exposes only minimum and maximum values. Metadata type support also varies by graphics context and CesiumJS version.

Why it may fit

This skill is most relevant when the requested effect needs geometry changes, custom material calculations or shader access to feature IDs and structural metadata. Its likely benefit is giving an assistant precise CesiumJS constraints alongside examples; that is an inference from the contents, not a measured improvement.

Its performance suggestions have identifiable mechanisms: REPLACE_MATERIAL skips the material stage, UNLIT skips lighting calculations, and reusing a texture avoids repeated asynchronous reloads. No benchmark establishes the resulting speedup or memory savings for a particular scene.

Alternatives

For declarative per-feature coloring, the source points to Cesium3DTileStyle and the sibling cesiumjs-3d-tiles skill. For Fabric materials, screen-space postprocessing or image-based lighting, it points to cesiumjs-materials-shaders.

For model loading, animations and feature-property access from JavaScript, it points to cesiumjs-models-particles. Metadata authoring is explicitly outside this skill's scope. These sibling resources are named in the source, but their full contents and comparative quality are not established here.

Evidence

The source provides detailed instructions, reference tables and readable examples. These establish what the resource teaches and how its snippets are written. REFERENCE.md names upstream engine files and a canonical Custom Shader Guide, but those upstream contents are not included.

The examples README describes the snippets as compile-tested. That is an author claim without accompanying execution logs, environment details or test results. Runtime correctness, visual quality, cross-browser behavior and assistant effectiveness remain unassessed.

Access & freshness

Costs

Apache 2.0 grants no-charge rights to the covered source material, subject to its conditions. No assistant subscription price, hosting charge, data-service price or hardware cost is supplied, so total operating cost is unknown.

The examples README states that its sample assets need no Cesium ion token. That statement does not establish pricing, account requirements or access terms for other datasets and deployments. Relative SampleData paths also require an appropriate hosting layout.

Rights and reuse

The repository-root LICENSE is Apache License 2.0. It permits reproduction, modification and redistribution, subject to providing the license, marking changed files, retaining relevant notices and carrying applicable NOTICE attributions when present. It also includes a patent grant with termination conditions, excludes general trademark permission and disclaims warranties.

These terms support reuse of the covered skill source and examples. They do not establish reuse rights for separately fetched models, textures or datasets; those assets need their own applicable terms. The supplied files contain no separate NOTICE file.

Freshness

The supplied source snapshot is revision 5f4792c09c4496f214ba9679cac6d7b3b014dcdd, captured on 16 November 2026. SKILL.md and the reference header declare a CesiumJS 1.144 baseline, although the reference's metadata subsection still labels its supported sources as 1.143.

The skill records important changes from earlier releases, including unsigned metadata handling in 1.139 and voxel input changes in 1.130. Upstream engine references and several remote assets use main-branch paths, so they can change independently of the fixed skill revision. Compatibility with later CesiumJS releases is unknown.

Next steps

Keep the original folder structure and license, then choose the example closest to your intended effect. Supply viewer initialization and valid asset paths before adapting its shader. Confirm that your asset contains every referenced attribute, feature ID and metadata property.

Check the installed CesiumJS version against the documented baseline and metadata migration notes. Use the documented transparency mode when changing alpha, account for unchanged bounds when displacing geometry, and avoid combining custom shaders with tileset styles.

Evaluate the intended effect with suitable camera framing and model size in your own scene. Add application teardown that releases shader-owned textures through destroy(). Verify external asset availability and reuse terms separately.

Evidence for this report

LICENSEnotice · checked 2026-11-16
skills/cesiumjs-custom-shader/REFERENCE.mdselected · checked 2026-11-16
skills/cesiumjs-custom-shader/SKILL.mdselected · checked 2026-11-16