added an analytical version of the pre-integrated environment brdf
added pre integrated material for the environemnt map
removed redundant import
added tool for cube map layout conversion
renaming for a better logic match
factor function out
added writeTextureImage
removed trace
switched to integer based ranges