rawLightmap_t *lm;
surfaceInfo_t *info;
trace_t trace;
-
+ qboolean noDirty;
+
/* bail if this number exceeds the number of raw lightmaps */
if( rawLightmapNum >= numRawLightmaps )
break;
}
}
+
+ noDirty = qfalse;\r
+ for( i = 0; i < trace.numSurfaces; i++ )\r
+ {\r
+ /* get surface */\r
+ info = &surfaceInfos[ trace.surfaces[ i ] ];\r
+\r
+ /* check twosidedness */\r
+ if( info->si->noDirty )\r
+ {\r
+ noDirty = qtrue;\r
+ break;\r
+ }\r
+ }
/* gather dirt */
for( y = 0; y < lm->sh; y++ )
/* only look at mapped luxels */
if( *cluster < 0 )
continue;
+
+ /* don't apply dirty on this surface */\r
+ if( noDirty )\r
+ {\r
+ *dirt = 1.0f;\r
+ continue;\r
+ }
/* copy to trace */
trace.cluster = *cluster;
qb_t noFog; /* ydnar: supress fogging */
qb_t clipModel; /* ydnar: solid model hack */
qb_t noVertexLight; /* ydnar: leave vertex color alone */
-
+ qb_t noDirty; /* jal: do not apply the dirty pass to this surface */
+
byte styleMarker; /* ydnar: light styles hack */
float vertexScale; /* vertex light scale */
GetTokenAppend( shaderText, qfalse );
si->floodlightDirectionScale = atof( token );
}
+
+ /* jal: q3map_nodirty : skip dirty */
+ else if( !Q_stricmp( token, "q3map_nodirty" ) )
+ {
+ si->noDirty = qtrue;
+ }
/* q3map_lightmapSampleSize <value> */
else if( !Q_stricmp( token, "q3map_lightmapSampleSize" ) )
si->offset = atof( token );
}
- /* ydnar: q3map_textureSize <width> <height> (substitute for q3map_lightimage derivation for terrain) */
+ /* ydnar: q3map_fur <numlayers> <offset> <fade> */
else if( !Q_stricmp( token, "q3map_fur" ) )
{
GetTokenAppend( shaderText, qfalse );