}
/* allocate sampling flags storage */
- if ( ( lightSamples > 1 || lightRandomSamples ) && luxelFilterRadius == 0 ) {
+ if ( lightSamples > 1 || lightRandomSamples ) {
size = lm->sw * lm->sh * SUPER_LUXEL_SIZE * sizeof( unsigned char );
if ( lm->superFlags == NULL ) {
lm->superFlags = safe_malloc( size );
}
/* check for evilness */
- if ( trace.forceSubsampling > 1.0f && ( lightSamples > 1 || lightRandomSamples ) && luxelFilterRadius == 0 ) {
+ if ( trace.forceSubsampling > 1.0f && ( lightSamples > 1 || lightRandomSamples ) ) {
totalLighted++;
*flag |= FLAG_FORCE_SUBSAMPLING; /* force */
}
/* secondary pass, adaptive supersampling (fixme: use a contrast function to determine if subsampling is necessary) */
/* 2003-09-27: changed it so filtering disamples supersampling, as it would waste time */
- if ( ( lightSamples > 1 || lightRandomSamples ) && luxelFilterRadius == 0 ) {
+ if ( lightSamples > 1 || lightRandomSamples ) {
/* walk luxels */
for ( y = 0; y < ( lm->sh - 1 ); y++ )
{
radVertLuxel[ 2 ] = ( verts[ i ].normal[ 2 ] + 1.0f ) * 127.5f;
}
+ else if ( info->si->noVertexLight ) {
+ VectorSet( radVertLuxel, 127.5f, 127.5f, 127.5f );
+ }
+
+ else if ( noVertexLighting > 0 ) {
+ VectorSet( radVertLuxel, 127.5f * noVertexLighting, 127.5f * noVertexLighting, 127.5f * noVertexLighting );
+ }
+
/* illuminate the vertex */
else
{
VectorCopy( debugColors[ num % 12 ], radVertLuxel );
}
+ else if ( info->si->noVertexLight ) {
+ VectorSet( radVertLuxel, 127.5f, 127.5f, 127.5f );
+ }
+
+ else if ( noVertexLighting > 0 ) {
+ VectorSet( radVertLuxel, 127.5f * noVertexLighting, 127.5f * noVertexLighting, 127.5f * noVertexLighting );
+ }
+
/* divine color from the superluxels */
else
{