diff --git a/src/librender/trimesh.cpp b/src/librender/trimesh.cpp index f117b5ac..febd2a66 100644 --- a/src/librender/trimesh.cpp +++ b/src/librender/trimesh.cpp @@ -265,27 +265,26 @@ Float TriMesh::pdfArea(const ShapeSamplingRecord &sRec) const { void TriMesh::configure() { Shape::configure(); - if (m_areaPDF.isReady()) - return; - - m_aabb.reset(); + if (m_areaPDF.isReady()) { + m_aabb.reset(); - if (m_triangleCount == 0) - Log(EError, "Encountered an empty triangle mesh!"); + if (m_triangleCount == 0) + Log(EError, "Encountered an empty triangle mesh!"); - /* Generate a PDF for sampling wrt. area */ - for (size_t i=0; igetType() & BSDF::EAnisotropicMaterial + if (((m_bsdf->getType() & BSDF::EAnisotropicMaterial) || m_bsdf->usesRayDifferentials()) && !m_tangents) computeTangentSpaceBasis(); }