From 06fc706b4a3be57e3517e4fe652b06e36a778cd4 Mon Sep 17 00:00:00 2001 From: ncuxonaT Date: Wed, 7 Jan 2026 18:55:16 +0300 Subject: [PATCH 1/3] Update qrad.cpp --- utils/pxrad/qrad.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/utils/pxrad/qrad.cpp b/utils/pxrad/qrad.cpp index 33e25b8c..bf155ed5 100644 --- a/utils/pxrad/qrad.cpp +++ b/utils/pxrad/qrad.cpp @@ -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 From 015dc19ffd851cae8bd655e42ef47a7e7bad4fa8 Mon Sep 17 00:00:00 2001 From: ncuxonaT Date: Wed, 7 Jan 2026 18:59:27 +0300 Subject: [PATCH 2/3] Update qrad.cpp --- utils/pxrad/qrad.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/pxrad/qrad.cpp b/utils/pxrad/qrad.cpp index bf155ed5..de63136e 100644 --- a/utils/pxrad/qrad.cpp +++ b/utils/pxrad/qrad.cpp @@ -979,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 From f5e245858186e744088b118b886bb4e9a10390f4 Mon Sep 17 00:00:00 2001 From: ncuxonaT Date: Wed, 7 Jan 2026 19:00:38 +0300 Subject: [PATCH 3/3] Update lightmap.cpp --- utils/pxrad/lightmap.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/utils/pxrad/lightmap.cpp b/utils/pxrad/lightmap.cpp index 29ca9c27..b3ca2535 100644 --- a/utils/pxrad/lightmap.cpp +++ b/utils/pxrad/lightmap.cpp @@ -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;