fixed a bug with the default lighting setup

metadata
Wenzel Jakob 2010-08-12 02:43:17 +02:00
parent edb8b31d7f
commit 736de258ea
2 changed files with 7 additions and 7 deletions

View File

@ -38,3 +38,6 @@
^plugins/.*\.lib$
^plugins/.*\.dll$
tools/windows/mitsuba_res.res
^meshes/.*$
^textures/.*$
^mitsuba.*.log$

View File

@ -202,11 +202,6 @@ void Scene::configure() {
m_camera->configure();
m_sampler = m_camera->getSamplerX();
}
if (m_luminaires.size() == 0) {
Log(EWarn, "No luminaires found -- adding a constant environment source");
addChild("", PluginManager::getInstance()->createObject(Luminaire::m_theClass, Properties("constant")));
}
if (m_media.size() > 1)
Log(EError, "Scenes are currently restricted to at most one participating medium.");
@ -245,8 +240,10 @@ void Scene::initialize() {
}
if (!m_luminairePDF.isReady()) {
if (m_luminaires.size() == 0)
Log(EError, "The scene contains no light sources! Aborting..");
if (m_luminaires.size() == 0) {
Log(EWarn, "No luminaires found -- adding a constant environment source");
addChild("", PluginManager::getInstance()->createObject(Luminaire::m_theClass, Properties("constant")));
}
/* Calculate a discrete PDF to importance sample luminaires */
for (std::vector<Luminaire *>::iterator it = m_luminaires.begin();