Merge branch 'icculus'

This commit is contained in:
Rudolf Polzer 2010-06-24 12:30:02 +02:00
commit 64144b4a07

View File

@ -2359,6 +2359,7 @@ void IlluminateRawLightmap( int rawLightmapNum )
FreeTraceLights( &trace );
/* floodlight pass */
if( floodlighty )
FloodlightIlluminateLightmap(lm);
if (debugnormals)
@ -2584,6 +2585,8 @@ void IlluminateVertexes( int num )
rawLightmap_t *lm;
bspDrawVert_t *verts;
trace_t trace;
float floodLightAmount;
vec3_t floodColor;
/* get surface, info, and raw lightmap */
@ -2661,11 +2664,20 @@ void IlluminateVertexes( int num )
VectorCopy( verts[ i ].normal, trace.normal );
/* r7 dirt */
if( dirty )
if( dirty && !bouncing )
dirt = DirtForSample( &trace );
else
dirt = 1.0f;
/* jal: floodlight */
floodLightAmount = 0.0f;
VectorClear( floodColor );
if( floodlighty && !bouncing )
{
floodLightAmount = floodlightIntensity * FloodLightForSample( &trace, floodlightDistance, floodlight_lowquality );
VectorScale( floodlightRGB, floodLightAmount, floodColor );
}
/* trace */
LightingAtSample( &trace, ds->vertexStyles, colors );
@ -2675,6 +2687,9 @@ void IlluminateVertexes( int num )
/* r7 dirt */
VectorScale( colors[ lightmapNum ], dirt, colors[ lightmapNum ] );
/* jal: floodlight */
VectorAdd( colors[ lightmapNum ], floodColor, colors[ lightmapNum ] );
/* store */
radVertLuxel = RAD_VERTEX_LUXEL( lightmapNum, ds->firstVert + i );
VectorCopy( colors[ lightmapNum ], radVertLuxel );
@ -2721,6 +2736,9 @@ void IlluminateVertexes( int num )
/* r7 dirt */
VectorScale( colors[ lightmapNum ], dirt, colors[ lightmapNum ] );
/* jal: floodlight */
VectorAdd( colors[ lightmapNum ], floodColor, colors[ lightmapNum ] );
/* store */
radVertLuxel = RAD_VERTEX_LUXEL( lightmapNum, ds->firstVert + i );
VectorCopy( colors[ lightmapNum ], radVertLuxel );