Pixijs
RSamaium/CanvasEngine
Use this skill first for ANY PixiJS v8 task; it routes to the right specialized skill for the job.
CustomShader authoring — vertexShaderText and fragmentShaderText against VertexInput, FragmentInput, FeatureIds, Metadata, czmmodelMaterial.
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-custom-shader -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install CesiumGS/cesiumjs-skills cesiumjs-custom-shader --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/CesiumGS/cesiumjs-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/cesiumjs-custom-shader .claude/skills/cesiumjs-custom-shader && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "cesiumjs-custom-shader" agent skill from https://github.com/CesiumGS/cesiumjs-skills/tree/main/skills/cesiumjs-custom-shader into .claude/skills/cesiumjs-custom-shader/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cesiumjs-custom-shader", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/CesiumGS/cesiumjs-skills/tree/main/skills/cesiumjs-custom-shaderType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-custom-shader -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install CesiumGS/cesiumjs-skills cesiumjs-custom-shader --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/CesiumGS/cesiumjs-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/cesiumjs-custom-shader .agents/skills/cesiumjs-custom-shader && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "cesiumjs-custom-shader" agent skill from https://github.com/CesiumGS/cesiumjs-skills/tree/main/skills/cesiumjs-custom-shader into .agents/skills/cesiumjs-custom-shader/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cesiumjs-custom-shader", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-custom-shader -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install CesiumGS/cesiumjs-skills cesiumjs-custom-shader --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/CesiumGS/cesiumjs-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/cesiumjs-custom-shader .cursor/skills/cesiumjs-custom-shader && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "cesiumjs-custom-shader" agent skill from https://github.com/CesiumGS/cesiumjs-skills/tree/main/skills/cesiumjs-custom-shader into .cursor/skills/cesiumjs-custom-shader/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cesiumjs-custom-shader", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/CesiumGS/cesiumjs-skills.git --path skills/cesiumjs-custom-shader--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-custom-shader -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install CesiumGS/cesiumjs-skills cesiumjs-custom-shader --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/CesiumGS/cesiumjs-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/cesiumjs-custom-shader .gemini/skills/cesiumjs-custom-shader && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "cesiumjs-custom-shader" agent skill from https://github.com/CesiumGS/cesiumjs-skills/tree/main/skills/cesiumjs-custom-shader into .gemini/skills/cesiumjs-custom-shader/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cesiumjs-custom-shader", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install CesiumGS/cesiumjs-skills cesiumjs-custom-shaderInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-custom-shader -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/CesiumGS/cesiumjs-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/cesiumjs-custom-shader .github/skills/cesiumjs-custom-shader && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "cesiumjs-custom-shader" agent skill from https://github.com/CesiumGS/cesiumjs-skills/tree/main/skills/cesiumjs-custom-shader into .github/skills/cesiumjs-custom-shader/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cesiumjs-custom-shader", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-custom-shader -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install CesiumGS/cesiumjs-skills cesiumjs-custom-shader --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/CesiumGS/cesiumjs-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/cesiumjs-custom-shader .opencode/skills/cesiumjs-custom-shader && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "cesiumjs-custom-shader" agent skill from https://github.com/CesiumGS/cesiumjs-skills/tree/main/skills/cesiumjs-custom-shader into .opencode/skills/cesiumjs-custom-shader/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "cesiumjs-custom-shader", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
cesiumjs-custom-shaderCustomShader authoring — vertexShaderText and fragmentShaderText against VertexInput, FragmentInput, FeatureIds, Metadata, czmmodelMaterial.
Cesiumjs Custom Shader is an agent skill from CesiumGS/cesiumjs-skills. CustomShader authoring — vertexShaderText and fragmentShaderText against VertexInput, FragmentInput, FeatureIds, Metadata, czmmodelMaterial. Use when reading EXTmeshfeatures or EXTstructuralmetadata property textures/tables, vertex displacement, or shading VoxelPrimitive.
Its SKILL.md is about 5.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files (for example `REFERENCE.md`, `examples/01-diffuse-tint.js` and `examples/02-texture-swap.js`).
It sits in Game Development, covering Shaders. The repository describes itself as: Curated agent skills for CesiumJS development. The licence is Apache-2.0.
12 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 5f4792c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (JavaScript), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Cesiumjs Custom Shader loads about 5.1k tokens when it runs. Until then it costs about 75 tokens; SKILL.md has 1,643 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from CesiumGS/cesiumjs-skills at commit 5f4792c, republished under its Apache-2.0 licence (© CesiumGS). 1,643 words, ~5,087 tokens.
.claude/skills/cesiumjs-custom-shader/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.Version baseline: CesiumJS 1.144. 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().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.EXT_structural_metadata / EXT_mesh_features in glTF — tooling concern, not runtime.import { CustomShader, Model } from "cesium";
const shader = new CustomShader({
fragmentShaderText: `
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
material.diffuse = vec3(1.0, 0.0, 0.0);
}
`,
});
const model = await Model.fromGltfAsync({ url: "./aircraft.glb", customShader: shader });
viewer.scene.primitives.add(model);Note: Writing
material.alpharequirestranslucencyMode: CustomShaderTranslucencyMode.TRANSLUCENT— see "Translucency" below. On opaque models with the defaultINHERITmode, alpha writes are silently ignored.
Visual eval framing: after adding a shadered
Model, wait until the model is ready enough to render, then frame a known target point explicitly. Do not rely on the first post-load frame or on a tiny default-scale model. For public model evals, setminimumPixelSize(usually 256-400), use a moderatescale, and add a silhouette or strong color tint when the shader effect is the thing being judged.
Model — constructor option or mutable property:
const model = await Model.fromGltfAsync({ url, customShader });
model.customShader = newShader; // hot-swap
model.customShader = undefined; // clearCesium3DTileset — constructor option or mutable property. Only Model-backed tile content is affected (not native I3S or other formats):
const tileset = await Cesium3DTileset.fromUrl(url, { customShader });
tileset.customShader = newShader;Per the
Cesium3DTileset.customShaderJSDoc: "Using custom shaders with aCesium3DTileStylemay lead to undefined behavior." The property is also marked@experimental— it uses 3D Tiles spec surface that is not final and may change without Cesium's standard deprecation policy.
VoxelPrimitive — fragment-only subset (see "VoxelPrimitive shader subset" below):
const voxelPrimitive = new VoxelPrimitive({ provider, customShader });The engine calls customShader.update(frameState) automatically each frame. When finished with a CustomShader, call customShader.destroy() to release GPU texture resources owned by its TextureManager.
new CustomShader({
mode, // CustomShaderMode — default MODIFY_MATERIAL
lightingModel, // LightingModel — if omitted, model's default is preserved
translucencyMode, // CustomShaderTranslucencyMode — default INHERIT
uniforms, // { [name]: { type: UniformType, value } } — default {}
varyings, // { [name]: VaryingType } — default {}
vertexShaderText, // string or undefined
fragmentShaderText, // string or undefined
});Either vertexShaderText or fragmentShaderText is typically required. See REFERENCE.md for exhaustive enum values.
The runtime calls these from generated pipeline stages. Parameter names are part of the contract — renaming them breaks the shader.
void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) { ... }
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) { ... }Declare uniforms with { type, value }. The type is a UniformType value; the JS value type must match (e.g. VEC3 → Cartesian3). Uniforms are accessible in GLSL by their declared name.
import { CustomShader, UniformType, TextureUniform, Cartesian3 } from "cesium";
const shader = new CustomShader({
uniforms: {
u_tint: { type: UniformType.VEC3, value: new Cartesian3(1.0, 0.5, 0.2) },
u_time: { type: UniformType.FLOAT, value: 0.0 },
u_detail: { type: UniformType.SAMPLER_2D, value: new TextureUniform({ url: "./detail.png", repeat: true }) },
},
fragmentShaderText: `
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
vec3 d = texture(u_detail, fsInput.attributes.texCoord_0).rgb;
material.diffuse = mix(material.diffuse, u_tint, d.r + 0.1 * sin(u_time));
}
`,
});
// Update at runtime. For Cartesian/Matrix values, setUniform clones into existing storage.
shader.setUniform("u_time", performance.now() / 1000);TextureUniform accepts either url (string or Resource) or typedArray + width + height — exactly one (constructor throws otherwise). Other options: repeat (default true), pixelFormat, pixelDatatype, minificationFilter, magnificationFilter, maximumAnisotropy.
SAMPLER_CUBE is declared on UniformType but rejected at construction — throws DeveloperError("CustomShader does not support samplerCube uniforms"). Only SAMPLER_2D is supported.
Declared varyings are emitted as out <type> <name> in the vertex shader and in <type> <name> in the fragment shader. Write in vertex, read in fragment.
import { CustomShader, VaryingType } from "cesium";
const shader = new CustomShader({
varyings: { v_worldHeight: VaryingType.FLOAT },
vertexShaderText: `
void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {
v_worldHeight = vsInput.attributes.positionMC.z;
}
`,
fragmentShaderText: `
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
float t = clamp(v_worldHeight / 100.0, 0.0, 1.0);
material.diffuse = mix(vec3(0.2,0.4,0.8), vec3(1.0,0.8,0.2), t);
}
`,
});VaryingType supports FLOAT, VEC2–VEC4, MAT2–MAT4. No INT/BOOL/SAMPLER variants.
CustomShaderMode:
MODIFY_MATERIAL (default) — runs after the material stage, before lighting. czm_modelMaterial is populated with PBR/texture results; the shader refines them.REPLACE_MATERIAL — skips the material stage entirely. Shader sets every field procedurally. Cheaper when the source material is not needed.LightingModel:
UNLIT — skip lighting; material.diffuse becomes the final color (alpha still applied). Flat-shaded.PBR — physically-based with IBL when available.Pair REPLACE_MATERIAL + UNLIT for pure procedural flat shading (no material sampling, no lighting).
CustomShaderTranslucencyMode governs how alpha writes interact with the render pass:
INHERIT (default) — alpha is only honored if the source material is translucent.OPAQUE — force opaque pass.TRANSLUCENT — force translucent pass.Pitfall: writing material.alpha on an opaque model with INHERIT silently does nothing. Set translucencyMode: CustomShaderTranslucencyMode.TRANSLUCENT to make alpha writes effective.
import { CustomShader, CustomShaderTranslucencyMode } from "cesium";
const shader = new CustomShader({
translucencyMode: CustomShaderTranslucencyMode.TRANSLUCENT,
fragmentShaderText: `
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
material.diffuse = vec3(0.2, 0.6, 1.0);
material.alpha = 0.5; // honored because translucencyMode is TRANSLUCENT
}
`,
});See examples/04-translucent-override.js.
vsInput.attributes and fsInput.attributes expose glTF vertex attributes. Names are case-sensitive and coordinate-space suffixes are required — the constructor rejects bare position/normal/tangent/bitangent.
Common fields (full table in REFERENCE.md):
positionMC — model coords, valid in VS and FSpositionWC — world (ECEF) coords, fragment only, low-precisionpositionEC — eye coords, fragment onlynormalMC / normalEC — vertex / fragmenttangentMC / tangentEC, bitangentMC / bitangentECtexCoord_N, color_N, joints_N, weights_NCoordinate-space validation. The constructor scans shader text and throws
DeveloperError("<name> is not available in the <stage> shader. Did you mean <alt> instead?")for invalid combinations. Examples:positionECin vertex,normalMCin fragment.
Custom underscore-prefixed glTF attributes (_FEATURE_ID_0, _SURFACE_TEMP) are lowercased and un-prefixed: fsInput.attributes.surface_temp.
vsInput.featureIds / fsInput.featureIds unify three glTF sources into one struct:
featureId_N — feature ID attributes and implicit attributes from EXT_mesh_features (N is the array index in the primitive's featureIds array). Also covers feature ID textures, which are fragment-shader-only.instanceFeatureId_N — per-instance feature IDs from EXT_instance_features + EXT_mesh_gpu_instancing."label": "perVertex", then featureIds.perVertex is also available.BATCH_ID / _BATCHID → transparently renamed to featureId_0.GLSL type is always int. WebGL 1 loses precision above 2^24.
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
int id = fsInput.featureIds.featureId_0;
if (id == 0) material.diffuse = vec3(1.0, 0.2, 0.2); // roof
else if (id == 1) material.diffuse = vec3(0.2, 0.8, 0.2); // wall
}See examples/03-feature-id-tileset.js.
EXT_structural_metadata surfaces three source types (all addressable from shaders as of 1.139):
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
float t = fsInput.metadata.temperature;
float tMin = fsInput.metadataStatistics.temperature.minValue;
float tMax = fsInput.metadataStatistics.temperature.maxValue;
float v = (t - tMin) / (tMax - tMin);
material.diffuse = vec3(v, 0.0, 1.0 - v);
}Property ID sanitization (GLSL identifier rules):
_ (temperature ℃ → temperature_)gl_ stripped (gl_custom → custom)_ (12345 → _12345)Sibling structs: metadataClass.<prop>.noData | defaultValue | minValue | maxValue (class-schema bounds) and metadataStatistics.<prop>.minValue | maxValue | mean | median | standardDeviation | variance | sum (populated only when tileset.json declares statistics).
1.139 breaking change (#13135): unsigned integer metadata is no longer cast to signed int. Assigning a
UINTproperty to a GLSLint(int x = fsInput.metadata.myUint;) no longer compiles. Use the matching unsigned type.
Public assets without EXT_structural_metadata on a .glb are scarce — most real-world metadata lives on 3D Tiles. See examples/06-metadata-ramp.js (Cesium3DTileset target).
czm_modelVertexOutput (vertex shader's inout vsOutput):
struct czm_modelVertexOutput {
vec3 positionMC; // initialized to vsInput.attributes.positionMC
float pointSize; // overrides gl_PointSize and Cesium3DTileStyle point sizing
};Gotcha: mutating
positionMCdisplaces vertices but does not update the primitive's bounding sphere. Heavily displaced vertices can be frustum-culled.
czm_modelMaterial (fragment shader's inout material). All colors are linear RGB. Conditional fields specularWeight / anisotropic* / clearcoatFactor... appear only when KHR_materials_specular / _anisotropy / _clearcoat is active on the primitive (see REFERENCE.md for the full #ifdef-guarded struct):
struct czm_modelMaterial {
vec4 baseColor; vec3 diffuse; float alpha;
vec3 specular; float roughness;
vec3 normalEC; float occlusion; vec3 emissive;
// + conditional PBR extension fields
};czm_* automatic uniformsAvailable without declaration. Most useful for CustomShader: czm_frameNumber, czm_pi, czm_model, czm_view, czm_projection, czm_modelView, czm_normal, czm_lightDirectionEC, czm_sunDirectionWC, czm_eyeHeight, czm_sceneMode, czm_viewerPositionWC, czm_splitPosition. Full catalog in REFERENCE.md.
Fragment-only. Executes at every raymarching step along the view ray; the final pixel composites all steps. Supplying vertexShaderText is silently ignored.
Reduced struct availability:
fsInput.attributes — only positionEC and normalEC.fsInput.featureIds — not present.fsInput.metadata — fully supported.fsInput.metadataClass — not present.fsInput.metadataStatistics — only minValue and maxValue.Assigning customShader = undefined falls back to VoxelPrimitive.DefaultCustomShader. See examples/07-voxel-shader.js. For VoxelPrimitive setup (provider, shape, modelMatrix, nearestSampling), see cesiumjs-3d-tiles.
1.130 breaking change (#12636):
fsInput.voxel.positionUv | positionShapeUv | positionLocalwere removed. UsefsInput.attributes.positionECinstead.fsInput.voxel.surfaceNormal→fsInput.attributes.normalEC. 1.142 fix (#13517): the built-in default voxel shader handles common metadata types more robustly. Keep a custom shader only when you need explicit classification, coloring, filtering, or raymarch-step logic.
| File | Target | Demonstrates |
|---|---|---|
examples/01-diffuse-tint.js | Model | Time uniform driving material.diffuse |
examples/02-texture-swap.js | Model | TextureUniform, SAMPLER_2D, setUniform |
examples/03-feature-id-tileset.js | Cesium3DTileset | fsInput.featureIds.featureId_0 classification coloring |
examples/04-translucent-override.js | Model (opaque source) | CustomShaderTranslucencyMode.TRANSLUCENT |
examples/05-vertex-displacement.js | Model | vsOutput.positionMC + normal offset |
examples/06-metadata-ramp.js | Cesium3DTileset | fsInput.metadata.<prop> + metadataStatistics normalization |
examples/07-voxel-shader.js | VoxelPrimitive | FS-only subset, per-voxel metadata |
Verbatim from upstream CHANGES.md:
Breaking (1.139, #13135):
Custom Shaders that rely on metadata derived from the
EXT_structural_metadataextension no longer cast unsigned integer metadata types to signed integers. Any existing custom shaders that assign UINT-type metadata to local integers (e.g.int myMetadata = vsInput.metadata.myUintMetadata) will no longer compile.
Breaking (1.139, #13170): Fixed precision of point cloud attributes when accessed in a custom fragment shader.
Addition (1.139, #13124): Access to metadata from property tables (previously only attributes/textures).
Addition (1.139, #13135): More metadata types via property textures.
Fix (1.139, #13231): Metadata variable regex extended to metadataClass and metadataStatistics.
Fix (1.139.1, #13247): NGA-GPM local extension + custom shader regression fix.
Fix (1.140, #13258): Custom shaders are no longer disabled for primitives with missing metadata when the metadata exists on the class definition.
Addition (1.140, #13323): Limited double-precision metadata support via downcasting.
Fix (1.142, #13517): Improved default voxel shader for common metadata types.
Breaking (1.130, #12636): Voxel FragmentInput restructured (see VoxelPrimitive section).
positionEC in vertex, normalMC in fragment, or any bare position/normal/tangent/bitangent throws DeveloperError at construction with a suggested alternative.positionMC is valid in fragment shader — despite the MC suffix. Only normalMC/tangentMC/bitangentMC are FS-rejected.Cesium3DTileStyle + CustomShader = undefined behavior. Per upstream JSDoc. Choose one per tileset.SAMPLER_CUBE rejected at construction. Use SAMPLER_2D only.vsInput, vsOutput, fsInput, material are scanned by regex — renaming breaks codegen.TextureUniform URL-vs-typedArray XOR. Supplying both or neither throws. typedArray requires width + height.INHERIT. Set translucencyMode: CustomShaderTranslucencyMode.TRANSLUCENT — do not just write material.alpha and expect it to work.customShader.destroy() required. Call when disposing of a shader that holds texture uniforms — otherwise its TextureManager leaks GPU resources.vsOutput.pointSize overrides Cesium3DTileStyle point sizing. Don't set it unless intended._; leading gl_ stripped; collisions are undefined behavior.uint x = fsInput.metadata.prop;, not int x = ....customShader on Cesium3DTileset is @experimental. May change without Cesium's standard deprecation policy.Model-backed tile content uses CustomShader. Native I3S and other formats are unaffected.REPLACE_MATERIAL skips the material stage (textures, PBR inputs not sampled).LightingModel.UNLIT skips lighting math — combine with REPLACE_MATERIAL for flat procedural shading.setUniform of SAMPLER_2D — it triggers async texture reload. Use url once and hold the reference.customShader.destroy() on teardown to release GPU texture resources.REFERENCE.md — full struct tables (Attributes, FeatureIds, Metadata/Class/Statistics), enum value tables, built-in czm_* uniform catalog, coordinate-space validation error reference.examples/ — seven compile-tested snippets. examples/_sandcastle-template.html is the internal scaffold; examples/README.md documents the layout.cesiumjs-materials-shaders — Fabric Material, ImageBasedLighting, PostProcessStage.cesiumjs-3d-tiles — Cesium3DTileStyle, Cesium3DTileset setup, VoxelPrimitive instantiation.cesiumjs-models-particles — Model.fromGltfAsync, ModelFeature.getProperty(), animations.cesiumjs-primitives — Fabric on Appearances for classic Primitive geometry.Documentation/CustomShaderGuide/README.md on CesiumGS/cesium main.© CesiumGS, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 10 other files in skills/cesiumjs-custom-shader of CesiumGS/cesiumjs-skills.
Open the folder on GitHubat commit 5f4792c
Cesiumjs Custom Shader next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Cesiumjs Custom Shader this skillCesiumGS/cesiumjs-skills | 189 | — | ~5.1k | Automated safety check: Pass | Apache-2.0 | |
| PixijsRSamaium/CanvasEngine | 401 | 2 repos | ~1.6k | Automated safety check: Pass | MIT | |
| New ExperimentTresjs/tres | 3.8k | — | ~782 | Automated safety check: Pass | MIT | |
| Assets Shader List AllIvanMurzak/Unity-MCP | 4.4k | — | ~435 | Automated safety check: Pass | Apache-2.0 | |
| Handle Sdr Tonemap Lutclshortfuse/renodx | 4.5k | — | ~7.3k | Automated safety check: Pass | MIT | |
| Unreal Material and VFX Workflowflopperam/unreal-engine-mcp | 1.1k | — | ~927 | Automated safety check: Pass | None |
RSamaium/CanvasEngine
Use this skill first for ANY PixiJS v8 task; it routes to the right specialized skill for the job.
Tresjs/tres
Create a new experiment in TresJS Lab with all necessary files
IvanMurzak/Unity-MCP
List all shaders available in the project assets and packages, sorted by name.
clshortfuse/renodx
RenoDX HLSL/Slang shader workflow for proven shader-side SDR tonemap, hard clip, LUT, color grade, and HDR bridge changes.
flopperam/unreal-engine-mcp
Walks an Unreal Engine MCP agent through building materials, Niagara particle systems, Chaos destruction, and curve assets with inspect-then-edit steps.
BANANASJIM/rdc-cli
A skill your agent uses when working with RenderDoc capture files (.rdc), analyzing GPU frames, tracing shaders, inspecting draw calls, or running CI assertions against GPU captures.
CesiumGS/cesiumjs-skills
CesiumJS 3D Tiles - Cesium3DTileset, compressed and CAD-style glTF content, MVTDataProvider, UrlTemplate3DTilesDataProvider, styling, metadata, feature picking, voxels, point clouds, I3S, Gaussian…
CesiumGS/cesiumjs-skills
CesiumJS core utilities and networking - Resource, Color, Event, Request, RequestScheduler, error handling, helper functions, feature detection.
CesiumGS/cesiumjs-skills
CesiumJS materials and post-processing — Material, Fabric JSON, MaterialAppearance, ImageBasedLighting, PostProcessStage, PostProcessStageLibrary, bloom, depth of field, ambient occlusion, FXAA…
CesiumGS/cesiumjs-skills
CesiumJS spatial math - Cartesian3, Cartographic, Matrix4, Quaternion, Transforms, Ellipsoid, BoundingSphere, projections, coordinate conversions.
CesiumGS/cesiumjs-skills
CesiumJS terrain, globe, and environment - TerrainProvider, Globe, sampleTerrain, atmosphere, sky, fog, lighting, shadows, panoramas.
CesiumGS/cesiumjs-skills
CesiumJS viewer setup - Viewer, CesiumWidget, widgets, Ion token, Scene configuration, SceneMode, factory helpers, geocoders, platform services.
Categories
CustomShader authoring — vertexShaderText and fragmentShaderText against VertexInput, FragmentInput, FeatureIds, Metadata, czmmodelMaterial. Cesiumjs Custom Shader is an agent skill from CesiumGS/cesiumjs-skills. CustomShader authoring — vertexShaderText and fragmentShaderText against VertexInput, FragmentInput, FeatureIds, Metadata, czmmodelMaterial.
Cesiumjs Custom Shader fits situations like: reading EXTmeshfeatures; EXTstructuralmetadata property textures/tables; vertex displacement; shading VoxelPrimitive.
Run `npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-custom-shader -a claude-code`. Or copy the skill folder (skills/cesiumjs-custom-shader in CesiumGS/cesiumjs-skills) into .claude/skills/cesiumjs-custom-shader in your project. Claude Code loads it when a task matches its description.
Run `npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-custom-shader -a codex`. Or copy the skill folder (skills/cesiumjs-custom-shader in CesiumGS/cesiumjs-skills) into .agents/skills/cesiumjs-custom-shader in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add CesiumGS/cesiumjs-skills --skill cesiumjs-custom-shader -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/cesiumjs-custom-shader, .gemini/skills/cesiumjs-custom-shader, .github/skills/cesiumjs-custom-shader and .opencode/skills/cesiumjs-custom-shader in your project.
Going by SKILL.md and its folder, Cesiumjs Custom Shader needs JavaScript for the scripts in its folder. Our summary lists: Node.js.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Cesiumjs Custom Shader is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.1k tokens (SKILL.md is roughly 20k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Cesiumjs Custom Shader: Pixijs (RSamaium/CanvasEngine, 401 stars), New Experiment (Tresjs/tres, 3.8k stars), Assets Shader List All (IvanMurzak/Unity-MCP, 4.4k stars) and Handle Sdr Tonemap Lut (clshortfuse/renodx, 4.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
CesiumGS (a GitHub organization) maintains it in CesiumGS/cesiumjs-skills, which has 189 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on September 14, 2026.
Source: CesiumGS/cesiumjs-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.