Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions utils/pxrad/lightmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2235,14 +2235,7 @@ void CreateDirectLights( void )
g_directlights = dl;

if( !VectorIsNull( p->reflectivity ))
{
VectorScale( dl->intensity, 0.5 / M_PI, dl->intensity );
VectorMultiply( dl->intensity, p->reflectivity, dl->intensity );
}
else
{
VectorScale( dl->intensity, DIRECT_SCALE, dl->intensity );
}

if( !FBitSet( p->flags, PATCH_EMITLIGHT ) || g_fastmode )
dl->topatch = true;
Expand Down
11 changes: 5 additions & 6 deletions utils/pxrad/qrad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,7 @@ void InitWorldLightFromPatch( dworldlight_t *wl, patch_t *p )
VectorScale( wl->intensity, p->exposure, wl->intensity );

if( !VectorIsNull( p->reflectivity ))
{
VectorMultiply( wl->intensity, p->reflectivity, wl->intensity );
}
else
{
VectorScale( wl->intensity, DIRECT_SCALE, wl->intensity );
}

VectorCopy( GetPlaneFromFace( p->faceNumber )->normal, wl->normal );
wl->stopdot = wl->stopdot2 = 0.0f; // not used
Expand Down Expand Up @@ -985,6 +979,11 @@ void ReadLightFile( const char *filename, bool use_direct_path )
g = powf( g / 255.0f, 2.2f );
b = powf( b / 255.0f, 2.2f );

//moved here from CreateDirectLights and InitWorldLightFromPatch
r *= 0.5f / M_PI;
g *= 0.5f / M_PI;
b *= 0.5f / M_PI;

if( argCnt == 2 )
{
// eith 1+1 args, the R,G,B values are all equal to the first value
Expand Down
Loading