hi i was trying to implement the catmull clark subdivision. i am having trouble in calculating the normals. i calculate the normals based on tangent vectors , but i am not getting it rt.i am using a cube with 6 faces, each having a valence of 3 intially. below is the sample of my code
if anyone knows whats wrong with this pls tell me. sometimes my cube becomes bright and sometimes very dark as i rotate it.