CustomShader via CZML model?

We have been serving some GLTF meshes via CZML using KHR_techniques_webgl to define custom shaders. Is it still possible to move to CustomShaders when the GLTF meshes are coming in via CZML models?

Actually, the same would apply for tilesets referenced via CZML.

Hi @coops-propeller,

Unfortunately, CustomShader is not supported in CZML. CZML tends to be a bit more restrictive than other parts of CesiumJS, and everything must be in JSON format. CustomShader is designed to be constructed at runtime, and it sometimes even manages GPU resources (texture uniforms).

Your post reminded me to check if CustomShader works with the entities system. As of this PR ,CustomShader is supported in the entities system. (see the ModelGraphics docs). Though I’d imagine it’s probably not quite what you’re looking for if you plan to use CZML.

You probably saw this in the glTF 1.0 thread, but we are at least thinking about what it would take to add techniques to the new Model. Here’s the relevant CesiumJS issue for convenience.

1 Like