more bugfixes

metadata
Wenzel Jakob 2011-06-23 05:37:58 +02:00
parent 503d7ab6c7
commit 504e19e420
2 changed files with 4 additions and 3 deletions

View File

@ -47,9 +47,6 @@ public:
void configure() { void configure() {
if (!m_nestedBRDF) if (!m_nestedBRDF)
Log(EError, "TwoSidedBRDF: A child BRDF instance is required"); Log(EError, "TwoSidedBRDF: A child BRDF instance is required");
if (m_combinedType & BSDF::ETransmission)
Log(EError, "TwoSidedBRDF: only BRDF child instances (without "
"transmission) are supported");
m_usesRayDifferentials = m_nestedBRDF->usesRayDifferentials(); m_usesRayDifferentials = m_nestedBRDF->usesRayDifferentials();
m_componentCount = m_nestedBRDF->getComponentCount(); m_componentCount = m_nestedBRDF->getComponentCount();
if (m_type) if (m_type)
@ -60,6 +57,9 @@ public:
m_type[i] = m_nestedBRDF->getType(i) | EFrontSide | EBackSide; m_type[i] = m_nestedBRDF->getType(i) | EFrontSide | EBackSide;
m_combinedType |= m_type[i]; m_combinedType |= m_type[i];
} }
if (m_combinedType & BSDF::ETransmission)
Log(EError, "TwoSidedBRDF: only BRDF child instances (without "
"transmission) are supported");
} }
Spectrum getDiffuseReflectance(const Intersection &its) const { Spectrum getDiffuseReflectance(const Intersection &its) const {

View File

@ -30,6 +30,7 @@ ref<Scene> Utility::loadScene(const std::string &filename,
FileResolver *resolver = Thread::getThread()->getFileResolver(); FileResolver *resolver = Thread::getThread()->getFileResolver();
SAXParser* parser = new SAXParser(); SAXParser* parser = new SAXParser();
fs::path schemaPath = resolver->resolveAbsolute("schema/scene.xsd"); fs::path schemaPath = resolver->resolveAbsolute("schema/scene.xsd");
Log(EDebug, "Loading scene \"%s\" ..", filename.c_str());
/* Check against the 'scene.xsd' XML Schema */ /* Check against the 'scene.xsd' XML Schema */
parser->setDoSchema(true); parser->setDoSchema(true);