@@ -521,6 +521,8 @@ void MaterialSystem::GenerateWorldCommandBuffer( std::vector<MaterialSurface>& s
521521
522522 Log::Debug ( " Total batch count: %u" , totalBatchCount );
523523
524+ totalDrawSurfs = surfaces.size ();
525+
524526 surfaceDescriptorsCount = totalDrawSurfs;
525527 descriptorSize = BOUNDING_SPHERE_SIZE + maxStages;
526528 surfaceDescriptorsSSBO.BufferData ( surfaceDescriptorsCount * descriptorSize, nullptr , GL_STATIC_DRAW );
@@ -685,7 +687,7 @@ void MaterialSystem::GenerateWorldCommandBuffer( std::vector<MaterialSurface>& s
685687 for ( MaterialPack& pack : materialPacks ) {
686688 totalCount += pack.materials .size ();
687689 }
688- Log::Notice ( " Generated %u BSP materials from %u BSP surfaces" , totalCount, surfaces. size () );
690+ Log::Notice ( " Generated %u BSP materials from %u BSP surfaces" , totalCount, totalDrawSurfs );
689691 Log::Notice ( " Materials UBO: total: %.2f kb, dynamic: %.2f kb, texData: %.2f kb" ,
690692 totalStageSize * 4 / 1024 .0f , dynamicStagesSize * 4 / 1024 .0f ,
691693 ( texData.size () + dynamicTexData.size () ) * TEX_BUNDLE_SIZE * 4 / 1024 .0f );
@@ -1326,8 +1328,6 @@ void MaterialSystem::ProcessStage( MaterialSurface* surface, shaderStage_t* pSta
13261328A material represents a distinct global OpenGL state (e. g. blend function, depth test, depth write etc.)
13271329Materials can have a dependency on other materials to make sure that consecutive stages are rendered in the proper order */
13281330void MaterialSystem::GenerateMaterial ( MaterialSurface* surface ) {
1329- totalDrawSurfs++;
1330-
13311331 uint32_t stage = 0 ;
13321332 uint32_t previousMaterialID = 0 ;
13331333
0 commit comments