Add a function for calculating bumpmap parameters.