add projection to go from pixels to clipspace
update code to work with 3D coordinates