OpenGL2: Remove per fragment tangent space calculation code.
This commit is contained in:
parent
4faf1008a0
commit
8749d62bbd
13 changed files with 5 additions and 130 deletions
|
@ -323,9 +323,7 @@ static void RB_SurfaceVertsAndIndexes( int numVerts, srfVert_t *verts, int numIn
|
|||
float *xyz, *texCoords, *lightCoords;
|
||||
int16_t *lightdir;
|
||||
int16_t *normal;
|
||||
#ifdef USE_VERT_TANGENT_SPACE
|
||||
int16_t *tangent;
|
||||
#endif
|
||||
glIndex_t *outIndex;
|
||||
float *color;
|
||||
|
||||
|
@ -356,7 +354,6 @@ static void RB_SurfaceVertsAndIndexes( int numVerts, srfVert_t *verts, int numIn
|
|||
VectorCopy4(dv->normal, normal);
|
||||
}
|
||||
|
||||
#ifdef USE_VERT_TANGENT_SPACE
|
||||
if ( tess.shader->vertexAttribs & ATTR_TANGENT )
|
||||
{
|
||||
dv = verts;
|
||||
|
@ -364,7 +361,6 @@ static void RB_SurfaceVertsAndIndexes( int numVerts, srfVert_t *verts, int numIn
|
|||
for ( i = 0 ; i < numVerts ; i++, dv++, tangent+=4 )
|
||||
VectorCopy4(dv->tangent, tangent);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( tess.shader->vertexAttribs & ATTR_TEXCOORD )
|
||||
{
|
||||
|
@ -1013,9 +1009,7 @@ static void RB_SurfaceGrid( srfBspSurface_t *srf ) {
|
|||
float *xyz;
|
||||
float *texCoords, *lightCoords;
|
||||
int16_t *normal;
|
||||
#ifdef USE_VERT_TANGENT_SPACE
|
||||
int16_t *tangent;
|
||||
#endif
|
||||
float *color;
|
||||
int16_t *lightdir;
|
||||
srfVert_t *dv;
|
||||
|
@ -1103,9 +1097,7 @@ static void RB_SurfaceGrid( srfBspSurface_t *srf ) {
|
|||
|
||||
xyz = tess.xyz[numVertexes];
|
||||
normal = tess.normal[numVertexes];
|
||||
#ifdef USE_VERT_TANGENT_SPACE
|
||||
tangent = tess.tangent[numVertexes];
|
||||
#endif
|
||||
texCoords = tess.texCoords[numVertexes][0];
|
||||
lightCoords = tess.texCoords[numVertexes][1];
|
||||
color = tess.vertexColors[numVertexes];
|
||||
|
@ -1129,13 +1121,12 @@ static void RB_SurfaceGrid( srfBspSurface_t *srf ) {
|
|||
normal += 4;
|
||||
}
|
||||
|
||||
#ifdef USE_VERT_TANGENT_SPACE
|
||||
if ( tess.shader->vertexAttribs & ATTR_TANGENT )
|
||||
{
|
||||
VectorCopy4(dv->tangent, tangent);
|
||||
tangent += 4;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( tess.shader->vertexAttribs & ATTR_TEXCOORD )
|
||||
{
|
||||
VectorCopy2(dv->st, texCoords);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue