shadow map refactoring