Skip to content

Commit

Permalink
Printing a more accurated log message in DLSC
Browse files Browse the repository at this point in the history
  • Loading branch information
Dade916 committed Jul 31, 2019
1 parent 38f231b commit bd722fb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/slg/lights/strategies/dlscacheimpl/dlscacheimpl.cpp
Expand Up @@ -522,7 +522,17 @@ void DirectLightSamplingCache::FillCacheEntry(const Scene *scene, DLSCacheEntry
}

void DirectLightSamplingCache::FillCacheEntries(const Scene *scene) {
SLG_LOG("Building direct light sampling cache: filling cache entries with " << scene->lightDefs.GetSize() << " light sources");
// Print the number of light with enabled direct light sampling
const vector<LightSource *> &lights = scene->lightDefs.GetLightSources();
u_int dlsLightCount = 0;
for (u_int lightIndex = 0; lightIndex < lights.size(); ++lightIndex) {
const LightSource *light = lights[lightIndex];

// Check if the light source uses direct light sampling
if (light->IsDirectLightSamplingEnabled())
++dlsLightCount;
}
SLG_LOG("Building direct light sampling cache: filling cache entries with " << dlsLightCount << " light sources");

double lastPrintTime = WallClockTime();
atomic<u_int> counter(0);
Expand Down

0 comments on commit bd722fb

Please sign in to comment.