Threaded View

Skeletal animation shader, use one compiled program or multiple?

I have a skeletal animation shader in which I send all bone translations as uniform matrices to the shader.

I use a single shader program right now for multiple skeletons. This means though that if a skeleton doesn't move then I still need to send the gpu the translation matrices since a single shader program is using uniforms for the data.

My question is is this how people typically do it? Or do others create multiple instances of the same shader so they can potentially send less data to the GPU if a skeleton isn't moving?

Mostly I just want to know how most people use shader programs for this (one program vs multiple) so I know whether I am or am not doing something dumb here.