Is there any way to apply a CustomShader to a Primitive?

As we known, CustomShader can be applied to Model and Cesium3DTileSet. Is there any way to apply a CustomShader to a Primitive?

I know that GLSL shader programs can be injected into a Primitive through Material and MaterialAppearance. However, it’s not as convenient as using a CustomShader.

Is it possible to extend CustomShader to support Primitive?

Hi @Hiwen,

It is possible to implement custom materials using GLSL, but the CustomShader API isn’t currently set up to be used with geometry primitives.

I do think it would make sense to unify the custom material approach across the API though.

1 Like

Thanks fro reply! @Gabby_Getz