1. A method for three-dimensional (3D) rendering, comprising: receiving a group of 3D triangles defining a triangular mesh of a surface, each 3D triangle in the group having three 3D vertices with respective 3D coordinates; transforming each 3D triangle into a corresponding two-dimensional (2D) triangle having three 2D vertices corresponding respectively to the 3D vertices, each 2D vertex having respective 2D pixel coordinates and a triplet of pixel attributes corresponding to the 3D coordinates of a corresponding 3D vertex; passing each 2D triangle to a graphics processor, which treats the triplet of pixel attributes of each 2D vertex as interpolatable values; in the graphics processor, computing respective triplets of interpolated pixel attributes for pixels within each 2D triangle by interpolation between the pixel attributes of the 2D vertices of the 2D triangle; and rendering a 3D image of the surface by converting the interpolated pixel attributes computed by the graphics processor into voxel coordinates in the 3D image.