How to use preprocess function for custom templates defined in hook_theme?
Drupal will automatically call hook_preprocess_[template] for each template defined in hook_theme. 

e.g:

MODULE_preprocess_custom_slider(&amp;$variables){}


Should be called by default. If not, then clear your cache to be sure the preprocess function is registered.

Fun fact is preprocess functions are called for theme functions as well, e.g theme_item_list calls hook_preprocess_item_list prior to rendering.