Barycentric coordinates working, might need some optimizations