Merge branch 'icculus'
This commit is contained in:
commit
64144b4a07
|
|
@ -2359,7 +2359,8 @@ void IlluminateRawLightmap( int rawLightmapNum )
|
||||||
FreeTraceLights( &trace );
|
FreeTraceLights( &trace );
|
||||||
|
|
||||||
/* floodlight pass */
|
/* floodlight pass */
|
||||||
FloodlightIlluminateLightmap(lm);
|
if( floodlighty )
|
||||||
|
FloodlightIlluminateLightmap(lm);
|
||||||
|
|
||||||
if (debugnormals)
|
if (debugnormals)
|
||||||
{
|
{
|
||||||
|
|
@ -2584,6 +2585,8 @@ void IlluminateVertexes( int num )
|
||||||
rawLightmap_t *lm;
|
rawLightmap_t *lm;
|
||||||
bspDrawVert_t *verts;
|
bspDrawVert_t *verts;
|
||||||
trace_t trace;
|
trace_t trace;
|
||||||
|
float floodLightAmount;
|
||||||
|
vec3_t floodColor;
|
||||||
|
|
||||||
|
|
||||||
/* get surface, info, and raw lightmap */
|
/* get surface, info, and raw lightmap */
|
||||||
|
|
@ -2661,11 +2664,20 @@ void IlluminateVertexes( int num )
|
||||||
VectorCopy( verts[ i ].normal, trace.normal );
|
VectorCopy( verts[ i ].normal, trace.normal );
|
||||||
|
|
||||||
/* r7 dirt */
|
/* r7 dirt */
|
||||||
if( dirty )
|
if( dirty && !bouncing )
|
||||||
dirt = DirtForSample( &trace );
|
dirt = DirtForSample( &trace );
|
||||||
else
|
else
|
||||||
dirt = 1.0f;
|
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 */
|
/* trace */
|
||||||
LightingAtSample( &trace, ds->vertexStyles, colors );
|
LightingAtSample( &trace, ds->vertexStyles, colors );
|
||||||
|
|
||||||
|
|
@ -2675,6 +2687,9 @@ void IlluminateVertexes( int num )
|
||||||
/* r7 dirt */
|
/* r7 dirt */
|
||||||
VectorScale( colors[ lightmapNum ], dirt, colors[ lightmapNum ] );
|
VectorScale( colors[ lightmapNum ], dirt, colors[ lightmapNum ] );
|
||||||
|
|
||||||
|
/* jal: floodlight */
|
||||||
|
VectorAdd( colors[ lightmapNum ], floodColor, colors[ lightmapNum ] );
|
||||||
|
|
||||||
/* store */
|
/* store */
|
||||||
radVertLuxel = RAD_VERTEX_LUXEL( lightmapNum, ds->firstVert + i );
|
radVertLuxel = RAD_VERTEX_LUXEL( lightmapNum, ds->firstVert + i );
|
||||||
VectorCopy( colors[ lightmapNum ], radVertLuxel );
|
VectorCopy( colors[ lightmapNum ], radVertLuxel );
|
||||||
|
|
@ -2721,6 +2736,9 @@ void IlluminateVertexes( int num )
|
||||||
/* r7 dirt */
|
/* r7 dirt */
|
||||||
VectorScale( colors[ lightmapNum ], dirt, colors[ lightmapNum ] );
|
VectorScale( colors[ lightmapNum ], dirt, colors[ lightmapNum ] );
|
||||||
|
|
||||||
|
/* jal: floodlight */
|
||||||
|
VectorAdd( colors[ lightmapNum ], floodColor, colors[ lightmapNum ] );
|
||||||
|
|
||||||
/* store */
|
/* store */
|
||||||
radVertLuxel = RAD_VERTEX_LUXEL( lightmapNum, ds->firstVert + i );
|
radVertLuxel = RAD_VERTEX_LUXEL( lightmapNum, ds->firstVert + i );
|
||||||
VectorCopy( colors[ lightmapNum ], radVertLuxel );
|
VectorCopy( colors[ lightmapNum ], radVertLuxel );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user