Corrected tangents used for bump mapping.

ver1_5_1
Chris Laurel 2003-03-05 09:31:44 +00:00
parent b0a7d54735
commit 78117e1aa1
1 changed files with 3 additions and 6 deletions

View File

@ -552,12 +552,9 @@ void LODSphereMesh::renderSection(int phi0, int theta0,
vertices[n3 + 2] = cphi * stheta;
// Compute the tangent--required for bump mapping
float tx = sphi * stheta;
float ty = -cphi;
float tz = sphi * ctheta;
tangents[n3] = tx;
tangents[n3 + 1] = ty;
tangents[n3 + 2] = tz;
tangents[n3] = -stheta;
tangents[n3 + 1] = 0.0f;
tangents[n3 + 2] = ctheta;
n2 += 2;
n3 += 3;