Refactored setting of directives in phong shader