raycasting, some fixes, still not exactly ok
two passes for texturing, WIP... should be better that raycasting idea