Skip to content

Commit 71ef87c

Browse files
committed
Don't log bad uvs for white/black lightmaps
1 parent 366c736 commit 71ef87c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/engine/renderer/tr_bsp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
2626
#include "framework/CommandSystem.h"
2727
#include "GeometryCache.h"
2828
#include "GeometryOptimiser.h"
29+
#include "ShadeCommon.h"
2930

3031
/*
3132
========================================================
@@ -926,7 +927,7 @@ void ValidateVertex( srfVert_t* vertex, int vertexID, shader_t* shader ) {
926927
/* Bad lightmap uv's on surfaces that don't use lightmapping seems to be very common in q3map2,
927928
so don't spam the log with them. We still need to fix such values though */
928929
for ( const shaderStage_t* pStage = shader->stages; pStage < shader->lastStage; pStage++ ) {
929-
if ( pStage->colorRenderer == &Render_lightMapping ) {
930+
if ( pStage->colorRenderer == &Render_lightMapping && !hasExplicitelyDisabledLightMap( shader ) ) {
930931
Log::Warn( "BSP: Bad lightmap in vertex %i: %s, %s; setting to 0.0f", vertexID,
931932
VertexToString( vertex ), shader->name );
932933
break;

0 commit comments

Comments
 (0)