OpenGL2: Remove per fragment tangent space calculation code.

This commit is contained in:
SmileTheory 2016-09-14 03:57:51 -07:00
parent 4faf1008a0
commit 8749d62bbd
13 changed files with 5 additions and 130 deletions

View file

@ -216,7 +216,6 @@ static int neighbors[8][2] = {
}
}
#ifdef USE_VERT_TANGENT_SPACE
static void MakeMeshTangentVectors(int width, int height, srfVert_t ctrl[MAX_GRID_SIZE][MAX_GRID_SIZE], int numIndexes,
glIndex_t indexes[(MAX_GRID_SIZE-1)*(MAX_GRID_SIZE-1)*2*3])
{
@ -255,7 +254,6 @@ static void MakeMeshTangentVectors(int width, int height, srfVert_t ctrl[MAX_GRI
}
}
}
#endif
static int MakeMeshIndexes(int width, int height, glIndex_t indexes[(MAX_GRID_SIZE-1)*(MAX_GRID_SIZE-1)*2*3])
@ -615,9 +613,7 @@ void R_SubdividePatchToGrid( srfBspSurface_t *grid, int width, int height,
// calculate normals
MakeMeshNormals( width, height, ctrl );
#ifdef USE_VERT_TANGENT_SPACE
MakeMeshTangentVectors(width, height, ctrl, numIndexes, indexes);
#endif
R_CreateSurfaceGridMesh(grid, width, height, ctrl, errorTable, numIndexes, indexes);
}
@ -670,9 +666,7 @@ void R_GridInsertColumn( srfBspSurface_t *grid, int column, int row, vec3_t poin
// calculate normals
MakeMeshNormals( width, height, ctrl );
#ifdef USE_VERT_TANGENT_SPACE
MakeMeshTangentVectors(width, height, ctrl, numIndexes, indexes);
#endif
VectorCopy(grid->lodOrigin, lodOrigin);
lodRadius = grid->lodRadius;
@ -732,9 +726,7 @@ void R_GridInsertRow( srfBspSurface_t *grid, int row, int column, vec3_t point,
// calculate normals
MakeMeshNormals( width, height, ctrl );
#ifdef USE_VERT_TANGENT_SPACE
MakeMeshTangentVectors(width, height, ctrl, numIndexes, indexes);
#endif
VectorCopy(grid->lodOrigin, lodOrigin);
lodRadius = grid->lodRadius;