yfeng95 / face3d

Python tools for 3D face: 3DMM, Mesh processing(transform, camera, light, render), 3D face representations.
2.64k stars 609 forks source link

a bug in render_texture with a fix method #81

Open IQ17 opened 3 years ago

IQ17 commented 3 years ago

For those who may use the mesh. render_texture (cython) function, please note there is a bug

error code

error is that it should use tex_tri_p0_ind rather than tri_p0_ind tex_p0.x = tex_coords[3*tex_tri_p0_ind]; tex_p0.y = tex_coords[3*tri_p0_ind + 1]; tex_p1.x = tex_coords[3*tex_tri_p1_ind]; tex_p1.y = tex_coords[3*tri_p1_ind + 1]; tex_p2.x = tex_coords[3*tex_tri_p2_ind]; tex_p2.y = tex_coords[3*tri_p2_ind + 1];