fix ds->lightmapAxis after MergeMetaTriangles
This commit is contained in:
parent
d3532111cf
commit
6abeb431e3
|
|
@ -483,7 +483,7 @@ void ClassifySurfaces( int numSurfs, mapDrawSurface_t *ds ){
|
||||||
{
|
{
|
||||||
ds->planeNum = -1;
|
ds->planeNum = -1;
|
||||||
ds->lightmapVecs[ 2 ].set( 0 );
|
ds->lightmapVecs[ 2 ].set( 0 );
|
||||||
//% if( ds->type == SURF_META || ds->type == SURF_FACE )
|
//% if( ds->type == ESurfaceType::Meta || ds->type == ESurfaceType::Face )
|
||||||
//% Sys_Warning( "Non-planar face (%d): %s\n", ds->planeNum, ds->shaderInfo->shader );
|
//% Sys_Warning( "Non-planar face (%d): %s\n", ds->planeNum, ds->shaderInfo->shader );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -703,7 +703,7 @@ static shaderInfo_t *GetIndexedShader( const shaderInfo_t *parent, const indexMa
|
||||||
|
|
||||||
/*
|
/*
|
||||||
DrawSurfaceForSide()
|
DrawSurfaceForSide()
|
||||||
creates a SURF_FACE drawsurface from a given brush side and winding
|
creates a ESurfaceType::Face drawsurface from a given brush side and winding
|
||||||
stores references to given brush and side
|
stores references to given brush and side
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1663,6 +1663,10 @@ static void MetaTrianglesToSurface( int *fOld, int *numAdded ){
|
||||||
/* classify the surface */
|
/* classify the surface */
|
||||||
ClassifySurfaces( 1, ds );
|
ClassifySurfaces( 1, ds );
|
||||||
//% Sys_Warning( "numV: %d numIdx: %d\n", ds->numVerts, ds->numIndexes );
|
//% Sys_Warning( "numV: %d numIdx: %d\n", ds->numVerts, ds->numIndexes );
|
||||||
|
/* ClassifySurfaces() sets axis from vertex normals
|
||||||
|
method is very questionable and axis actually happens to be wrong after normals passed through SmoothMetaTriangles()
|
||||||
|
use metaTriangle_t::lightmapAxis which is guaranteedly set and used as main factor for triangles merge */
|
||||||
|
ds->lightmapAxis = seed.lightmapAxis;
|
||||||
|
|
||||||
/* add to count */
|
/* add to count */
|
||||||
numMergedSurfaces++;
|
numMergedSurfaces++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user