put z value into variable
got hemisphere sampling working