imported code for normal and displacement mapping