I know. Use the effect_load instruction to apply to the dynamic shadows.

effect_load(mat_shadow,"shadow.fx");

Can it apply to it? If it doesn't post comments here.