How do you pass material parameters such as floating-point uniforms to shader programs?
In most engines they query locations of each uniform (by name/semantic) and set them one by one
(e.g. UpdateUniform( int buffer, int offset, const void* data, int size)).
Each uniform, or constant buffer has a shadow copy in sysmem an 'isDirty' flag to skip reuploading unchanged data to videomem.
Wouldn't it be better to have inside the material a parameter blob for just memcpy()ing to entire uniform buffer
(the blob format matches the shader constant buffer layout)? But it won't be possible for modders to assign new shaders to existing materials, right?