there is old code in the glsl lib which could be a guide. trick is just to get the coordinate system right