diff --git a/utils/pxrad/qrad.cpp b/utils/pxrad/qrad.cpp index 8690adc5..efa92297 100644 --- a/utils/pxrad/qrad.cpp +++ b/utils/pxrad/qrad.cpp @@ -2593,14 +2593,17 @@ void RadWorld( void ) #endif #ifdef HLRAD_VERTEXLIGHTING - BuildVertexLights(); //BuildFaceLights will get single gi bounce from studiomodels + Msg( "\n" ); + VertexDirectLighting(); //BuildFaceLights will get single gi bounce from studiomodels if( g_numstudiobounce > 0 ) { - g_studiogipasscounter = 1; - VertexPatchLights(); - VertexBlendGI(); + g_studiogipasscounter = 1; + Msg( "VertexIndirectLighting Prepass\n" ); + VertexIndirectGather(); + VertexIndirectBlend(); } + Msg( "\n" ); #endif @@ -2689,15 +2692,19 @@ void RadWorld( void ) #ifdef HLRAD_VERTEXLIGHTING + Msg( "\n" ); g_studiogipasscounter = 0; for( int i = 0; i < Q_max( 1, g_numstudiobounce ); i++ ) { - g_studiogipasscounter++; - VertexPatchLights(); - VertexBlendGI(); + g_studiogipasscounter++; + Msg( "VertexIndirectLighting Pass %d/%d\n", g_studiogipasscounter, g_numstudiobounce ); + VertexIndirectGather(); + VertexIndirectBlend(); + Msg( "\n" ); } FinalLightVertex(); + Msg( "\n" ); #endif #ifdef HLRAD_AMBIENTCUBES diff --git a/utils/pxrad/qrad.h b/utils/pxrad/qrad.h index ea31adee..8de15927 100644 --- a/utils/pxrad/qrad.h +++ b/utils/pxrad/qrad.h @@ -539,10 +539,10 @@ void CalcLuxelsCount( void ); // // vertexlight.c // -void BuildVertexLights( void ); -void VertexPatchLights( void ); +void VertexDirectLighting( void ); +void VertexIndirectGather( void ); void FinalLightVertex( void ); -void VertexBlendGI( void ); +void VertexIndirectBlend( void ); // // model_lightmaps.c diff --git a/utils/pxrad/trace.cpp b/utils/pxrad/trace.cpp index 34c27b44..e919e2f0 100644 --- a/utils/pxrad/trace.cpp +++ b/utils/pxrad/trace.cpp @@ -867,7 +867,10 @@ void InitWorldTrace( void ) #ifdef HLRAD_RAYTRACE int dispatch = 0, total = 0; double start = I_FloatTime(); - Msg( "Build KD-Trees:\n" ); + if( g_studiolegacy ) + Msg( "Build KD-Trees:\n" ); + else + Msg( "Build BVH-Trees:\n" ); StartPacifier(); for( i = 1; i < g_numentities; i++ ) diff --git a/utils/pxrad/vertexlight.cpp b/utils/pxrad/vertexlight.cpp index e9996330..508656a2 100644 --- a/utils/pxrad/vertexlight.cpp +++ b/utils/pxrad/vertexlight.cpp @@ -169,7 +169,7 @@ void SmoothModelNormals( int modelnum, int threadnum = -1 ) Mem_Free( normals ); } -void BuildVertexLights( int indexnum, int thread = -1 ) +void VertexDirectLighting( int indexnum, int thread = -1 ) { int modelnum = g_vertexlight_indexes[indexnum].modelnum; int vertexnum = g_vertexlight_indexes[indexnum].vertexnum; @@ -310,12 +310,12 @@ void BuildVertexLights( int indexnum, int thread = -1 ) /* ============ -VertexPatchLights +VertexIndirectGather This function is run multithreaded ============ */ -void VertexPatchLights( int indexnum, int threadnum = -1 ) +void VertexIndirectGather( int indexnum, int threadnum = -1 ) { int modelnum = g_vertexlight_indexes[indexnum].modelnum; int vertexnum = g_vertexlight_indexes[indexnum].vertexnum; @@ -485,7 +485,7 @@ void VertexPatchLights( int indexnum, int threadnum = -1 ) AddStylesToMesh( mesh, newstyles ); } -void VertexBlendGI( int modelnum, int threadnum = -1 ) +void VertexIndirectBlend( int modelnum, int threadnum = -1 ) { entity_t *mapent = g_vertexlight[modelnum]; tmesh_t *mesh; @@ -924,27 +924,27 @@ static void AllocVertexLighting( void ) // otherwise it's valid } -void BuildVertexLights( void ) +void VertexDirectLighting( void ) { GenerateLightCacheNumbers(); if( !g_vertexlight_numindexes ) return; - RunThreadsOnIndividual( g_vertexlight_numindexes, true, BuildVertexLights ); + RunThreadsOnIndividual( g_vertexlight_numindexes, true, VertexDirectLighting ); } -void VertexPatchLights( void ) +void VertexIndirectGather( void ) { if( !g_vertexlight_numindexes ) return; - RunThreadsOnIndividual( g_vertexlight_numindexes, true, VertexPatchLights ); + RunThreadsOnIndividual( g_vertexlight_numindexes, true, VertexIndirectGather ); } -void VertexBlendGI( void ) +void VertexIndirectBlend( void ) { if( !g_vertexlight_modnum ) return; - RunThreadsOnIndividual( g_vertexlight_modnum, true, VertexBlendGI ); + RunThreadsOnIndividual( g_vertexlight_modnum, true, VertexIndirectBlend ); } void FinalLightVertex( void )