Added a few materials functionality and fixed a bug in the hit distance of the 'supersampling' in camera.