How do I add uniforms for custom vertex shaders?

I use a custom vertex shader defined by appearance.vertexShaderSource on my primitive. Some of the variables in the shader source are uniforms since they should be changed by users at runtime. But I can’t find a place to define the uniforms for vertex shaders. There is a uniforms attribute in Material, but it doesn’t work for vertex shaders.


Hi @Insopitus,

Currently for vertex shaders, there is not a way to pass in additional custom uniforms, so geometries don’t have the same customizations as materials yet. There is a previous discussion here:

Thanks for the reply. I’ll check that out.