MLT: Increase the sample count for the direct illumination pass when the camera has out of focus blur

metadata
Wenzel Jakob 2014-03-24 18:29:53 +01:00
parent e6fcc6a8ae
commit 96379a07a9
1 changed files with 4 additions and 4 deletions

View File

@ -36,15 +36,15 @@ ref<Bitmap> BidirectionalUtils::renderDirectComponent(Scene *scene, int sceneRes
/* Render the direct illumination component separately */ /* Render the direct illumination component separately */
ref<Bitmap> directImage = new Bitmap(Bitmap::ERGBA, Bitmap::EFloat32, film->getCropSize()); ref<Bitmap> directImage = new Bitmap(Bitmap::ERGBA, Bitmap::EFloat32, film->getCropSize());
bool hasMedia = scene->getMedia().size() > 0; bool hasMedia = scene->getMedia().size() > 0;
bool hasDOF = scene->getSensor()->needsApertureSample();
size_t pixelSamples = directSamples; size_t pixelSamples = directSamples;
Properties integratorProps(hasMedia ? "volpath" : "direct"); Properties integratorProps(hasMedia ? "volpath" : "direct");
if (hasMedia) { if (hasMedia || hasDOF) {
/* Render with a volumetric path tracer */
integratorProps.setInteger("maxDepth", 2); integratorProps.setInteger("maxDepth", 2);
} else { } else {
/* No participating media-> we can use the 'direct' plugin, which has /* No participating media / DoF -> we can more carefully
somewhat better control over where to place shading/pixel samples */ distribute samples between shading and visibility */
int shadingSamples = 1; int shadingSamples = 1;
while (pixelSamples > 8) { while (pixelSamples > 8) {
pixelSamples /= 2; pixelSamples /= 2;