sivan, I know that you used that old snippet, but it had some issues I fixed in this version. And I know that the stencil buffer approach sucks, but it has the advantage of just working good enough for most people here. Everything else needs too much of a custom rendering approach for most people to handle.

Ch40zzC0d3r, in vp_depth.fx and also in vp_pssm.fx at the top is an uncommented #define BONES, just make sure that define in set in both shaders and it should work fine with bone animations. The difference is that the DoBone will apply the bone transformations in the vertex shader to each vertex, to actually make the model animate. So without it, it will generate depthmaps and shadows as if the models would not be animated.