diff --git a/include/mitsuba/hw/vpl.h b/include/mitsuba/hw/vpl.h index 74007676..b6b7474f 100644 --- a/include/mitsuba/hw/vpl.h +++ b/include/mitsuba/hw/vpl.h @@ -46,11 +46,17 @@ public: /// Is shadow map generation generation performed in a single pass? inline bool isSinglePass() const { return m_singlePass; } - /// Set whether or not non-diffuse VPLs are permitted - inline void setAllowNonDiffuseVPLs(bool allowNonDiffuseVPLs) { m_allowNonDiffuseVPLs = allowNonDiffuseVPLs; } + /// Set whether or not non-diffuse VPLs are used + inline void setDiffuseSources(bool diffuseSources) { m_diffuseSources = diffuseSources; } - /// Are non-diffuse VPLs permitted? This is more realistic, but can take a long time to converge. - inline bool allowNonDiffuseVPLs() const { return m_allowNonDiffuseVPLs; } + /// Return whether or not non-diffuse VPLs are used + inline bool getDiffuseSources() const { return m_diffuseSources; } + + /// Set whether or not surfaces are drawn assumed to be diffuse + inline void setDiffuseReceivers(bool diffuseReceivers) { m_diffuseReceivers = diffuseReceivers; } + + /// Return whether or not surfaces are assumed to be diffuse + inline bool getDiffuseReceivers() const { return m_diffuseReceivers; } /// Set the current shadow map resolution inline void setShadowMapResolution(int resolution) { m_shadowMapResolution = resolution; } @@ -150,7 +156,8 @@ private: bool hasLuminaire; int param_shadowMap, param_vplPos, param_camPos, param_vplPower; int param_vplN, param_vplS, param_vplT, param_vplWi, param_vplUV; - int param_nearClip, param_invClipRange, param_minDist, param_allowNonDiffuseVPLs; + int param_nearClip, param_invClipRange, param_minDist; + int param_diffuseSources, param_diffuseReceivers; inline VPLProgramConfiguration() { } @@ -232,7 +239,8 @@ private: ref m_shadowMap; Float m_nearClip, m_invClipRange; int m_shadowMapResolution; - bool m_singlePass, m_allowNonDiffuseVPLs; + bool m_singlePass; + bool m_diffuseSources, m_diffuseReceivers; /* Rendering related */ std::map m_programs; diff --git a/src/libhw/vpl.cpp b/src/libhw/vpl.cpp index cc6ce278..0d424de2 100644 --- a/src/libhw/vpl.cpp +++ b/src/libhw/vpl.cpp @@ -8,7 +8,8 @@ MTS_NAMESPACE_BEGIN VPLShaderManager::VPLShaderManager(const Scene *scene, Renderer *renderer) : m_scene(scene), m_renderer(renderer), m_clamping(0.1f), m_maxClipDist(std::numeric_limits::infinity()), m_initialized(false), - m_shadowMapResolution(512), m_singlePass(false), m_allowNonDiffuseVPLs(false) { + m_shadowMapResolution(512), m_singlePass(false), + m_diffuseSources(false), m_diffuseReceivers(false) { } VPLShaderManager::~VPLShaderManager() { @@ -320,7 +321,7 @@ void VPLShaderManager::configure(const VPL &vpl, const BSDF *bsdf, const Luminai << "uniform vec3 vplPower, vplS, vplT, vplN, vplWi;" << endl << "uniform float nearClip, invClipRange, minDist;" << endl << "uniform vec2 vplUV;" << endl - << "uniform bool allowNonDiffuseVPLs;" << endl + << "uniform bool diffuseSources, diffuseReceivers;" << endl << endl << "/* Inputs <- Vertex program */" << endl << "varying vec3 normal, tangent, lightVec, camVec;" << endl @@ -363,7 +364,7 @@ void VPLShaderManager::configure(const VPL &vpl, const BSDF *bsdf, const Luminai << " dot(vplT, nLightVec)," << endl << " dot(vplN, nLightVec));" << endl << " vec3 vplLo = vplPower;" << endl - << " if (allowNonDiffuseVPLs)" << endl + << " if (!diffuseSources)" << endl << " vplLo *= " << vplEvalName; if (vpl.type == ESurfaceVPL) oss << "(vplUV, vplWi, vplWo);" << endl; @@ -402,7 +403,8 @@ void VPLShaderManager::configure(const VPL &vpl, const BSDF *bsdf, const Luminai m_targetConfig.param_nearClip = program->getParameterID("nearClip", false); m_targetConfig.param_invClipRange = program->getParameterID("invClipRange", false); m_targetConfig.param_minDist = program->getParameterID("minDist", false); - m_targetConfig.param_allowNonDiffuseVPLs = program->getParameterID("allowNonDiffuseVPLs", false); + m_targetConfig.param_diffuseSources = program->getParameterID("diffuseSources", false); + m_targetConfig.param_diffuseReceivers = program->getParameterID("diffuseReceivers", false); m_current.program = program; m_current.config = m_targetConfig; m_programs[configName] = m_current; @@ -423,13 +425,13 @@ void VPLShaderManager::configure(const VPL &vpl, const BSDF *bsdf, const Luminai if (vpl.type == ESurfaceVPL) { program->setParameter(config.param_vplWi, vpl.its.wi); program->setParameter(config.param_vplUV, vpl.its.uv); - program->setParameter(config.param_allowNonDiffuseVPLs, m_allowNonDiffuseVPLs); + program->setParameter(config.param_diffuseSources, m_diffuseSources); } - if (!m_allowNonDiffuseVPLs && vpl.type == ESurfaceVPL) - program->setParameter(config.param_vplPower, vpl.P - * vpl.its.shape->getBSDF()->getDiffuseReflectance(vpl.its) * INV_PI); - else - program->setParameter(config.param_vplPower, vpl.P); + Spectrum power = vpl.P; + if (m_diffuseSources && vpl.type == ESurfaceVPL) + power *= vpl.its.shape->getBSDF()->getDiffuseReflectance(vpl.its) * INV_PI; + program->setParameter(config.param_vplPower, power); + program->setParameter(config.param_diffuseReceivers, m_diffuseReceivers); program->setParameter(config.param_nearClip, m_nearClip); program->setParameter(config.param_invClipRange, m_invClipRange); program->setParameter(config.param_minDist, m_minDist); diff --git a/src/qtgui/common.h b/src/qtgui/common.h index 5c6ec0ee..2869ce9b 100644 --- a/src/qtgui/common.h +++ b/src/qtgui/common.h @@ -132,7 +132,8 @@ struct SceneContext { QSize windowSize, sizeIncrease; Vector2i scrollOffset; Float reinhardKey, reinhardBurn; - bool allowNonDiffuseVPLs; + bool diffuseSources; + bool diffuseReceivers; /* Preview state */ std::deque vpls; diff --git a/src/qtgui/glwidget.cpp b/src/qtgui/glwidget.cpp index 4660cc9f..71f91046 100644 --- a/src/qtgui/glwidget.cpp +++ b/src/qtgui/glwidget.cpp @@ -297,13 +297,19 @@ void GLWidget::setShadowMapResolution(int res) { } } -void GLWidget::setAllowNonDiffuseVPLs(bool value) { - if (value != m_context->allowNonDiffuseVPLs) { - m_context->allowNonDiffuseVPLs = value; +void GLWidget::setDiffuseSources(bool value) { + if (value != m_context->diffuseSources) { + m_context->diffuseSources = value; resetPreview(); } } +void GLWidget::setDiffuseReceivers(bool value) { + if (value != m_context->diffuseReceivers) { + m_context->diffuseReceivers = value; + resetPreview(); + } +} void GLWidget::setPreviewMethod(EPreviewMethod method) { if (method != m_context->previewMethod) { diff --git a/src/qtgui/glwidget.h b/src/qtgui/glwidget.h index 67324d07..04efb968 100644 --- a/src/qtgui/glwidget.h +++ b/src/qtgui/glwidget.h @@ -58,7 +58,8 @@ public slots: void setGamma(bool srgb, Float gamma); void setReinhardKey(Float value); void setReinhardBurn(Float value); - void setAllowNonDiffuseVPLs(bool value); + void setDiffuseSources(bool value); + void setDiffuseReceivers(bool value); void setExposure(Float exposure); void onException(const QString &what); void onScroll(); diff --git a/src/qtgui/mainwindow.cpp b/src/qtgui/mainwindow.cpp index 562a56e6..345c2edd 100644 --- a/src/qtgui/mainwindow.cpp +++ b/src/qtgui/mainwindow.cpp @@ -921,7 +921,8 @@ void MainWindow::on_actionPreviewSettings_triggered() { connect(&d, SIGNAL(reinhardBurnChanged(Float)), ui->glView, SLOT(setReinhardBurn(Float))); connect(&d, SIGNAL(previewMethodChanged(EPreviewMethod)), ui->glView, SLOT(setPreviewMethod(EPreviewMethod))); connect(&d, SIGNAL(toneMappingMethodChanged(EToneMappingMethod)), ui->glView, SLOT(setToneMappingMethod(EToneMappingMethod))); - connect(&d, SIGNAL(allowNonDiffuseVPLsChanged(bool)), ui->glView, SLOT(setAllowNonDiffuseVPLs(bool))); + connect(&d, SIGNAL(diffuseReceiversChanged(bool)), ui->glView, SLOT(setDiffuseReceivers(bool))); + connect(&d, SIGNAL(diffuseSourcesChanged(bool)), ui->glView, SLOT(setDiffuseSources(bool))); d.setMaximumSize(d.minimumSize()); d.exec(); QSettings settings("mitsuba-renderer.org", "qtgui"); @@ -934,7 +935,8 @@ void MainWindow::on_actionPreviewSettings_triggered() { settings.setValue("preview_clamping", context->clamping); settings.setValue("preview_previewMethod", context->previewMethod); settings.setValue("preview_toneMappingMethod", context->toneMappingMethod); - settings.setValue("preview_allowNonDiffuseVPLs", context->allowNonDiffuseVPLs); + settings.setValue("preview_diffuseReceivers", context->diffuseReceivers); + settings.setValue("preview_diffuseSources", context->diffuseSources); #else if (!m_previewSettings) { m_previewSettings = new PreviewSettingsDlg(this); @@ -974,7 +976,8 @@ void MainWindow::onPreviewSettingsClose() { settings.setValue("preview_clamping", context->clamping); settings.setValue("preview_previewMethod", context->previewMethod); settings.setValue("preview_toneMappingMethod", context->toneMappingMethod); - settings.setValue("preview_allowNonDiffuseVPLs", context->allowNonDiffuseVPLs); + settings.setValue("preview_diffuseSources", context->diffuseSources); + settings.setValue("preview_diffuseReceivers", context->diffuseReceivers); } } @@ -1605,7 +1608,8 @@ SceneContext::SceneContext(SceneContext *ctx) { scrollOffset = ctx->scrollOffset; reinhardKey = ctx->reinhardKey; reinhardBurn = ctx->reinhardBurn; - allowNonDiffuseVPLs = ctx->allowNonDiffuseVPLs; + diffuseReceivers = ctx->diffuseReceivers; + diffuseSources = ctx->diffuseSources; } SceneContext::~SceneContext() { diff --git a/src/qtgui/preview.cpp b/src/qtgui/preview.cpp index 60978325..1e137815 100644 --- a/src/qtgui/preview.cpp +++ b/src/qtgui/preview.cpp @@ -356,7 +356,8 @@ void PreviewThread::run() { m_shaderManager->setShadowMapResolution(m_context->shadowMapResolution); m_shaderManager->setClamping(m_context->clamping); m_shaderManager->setSinglePass(m_context->previewMethod == EOpenGLSinglePass); - m_shaderManager->setAllowNonDiffuseVPLs(m_context->allowNonDiffuseVPLs); + m_shaderManager->setDiffuseSources(m_context->diffuseSources); + m_shaderManager->setDiffuseReceivers(m_context->diffuseReceivers); if (m_timer->getMilliseconds() > 1000) { Float count = m_vplsPerSecond / (Float) m_timer->getMilliseconds() * 1000; diff --git a/src/qtgui/previewsettingsdlg.cpp b/src/qtgui/previewsettingsdlg.cpp index d042f70a..f233c716 100644 --- a/src/qtgui/previewsettingsdlg.cpp +++ b/src/qtgui/previewsettingsdlg.cpp @@ -56,7 +56,8 @@ PreviewSettingsDialog::PreviewSettingsDialog(QWidget *parent, SceneContext *ctx, ui->clampingSlider->setValue(clamping); ui->gammaSpinBox->setValue(ctx->gamma); ui->sRGBCheckBox->setCheckState(ctx->srgb ? Qt::Checked : Qt::Unchecked); - ui->nonDiffuseVPLBox->setCheckState(ctx->allowNonDiffuseVPLs ? Qt::Checked : Qt::Unchecked); + ui->diffuseSourcesBox->setCheckState(ctx->diffuseSources ? Qt::Checked : Qt::Unchecked); + ui->diffuseReceiversBox->setCheckState(ctx->diffuseReceivers ? Qt::Checked : Qt::Unchecked); ui->previewMethodCombo->setModel(new MethodModel(this, cap->isSupported(RendererCapabilities::EGeometryShaders))); ui->previewMethodCombo->setCurrentIndex(ctx->previewMethod); @@ -65,6 +66,7 @@ PreviewSettingsDialog::PreviewSettingsDialog(QWidget *parent, SceneContext *ctx, ? ctx->exposure : ctx->reinhardBurn)*100)); m_ignoreEvent = false; ui->keySlider->setValue((int) ((ctx->reinhardKey-REINHARD_MIN)/REINHARD_RANGE * 100)); + ui->diffuseReceiversBox->setEnabled(ui->diffuseSourcesBox->isChecked()); on_previewMethodCombo_activated(ctx->previewMethod); on_toneMappingMethodCombo_activated(ctx->toneMappingMethod); @@ -88,7 +90,8 @@ void PreviewSettingsDialog::on_resetButton_clicked() { ui->keySlider->setValue((int) ((0.18-REINHARD_MIN)/REINHARD_RANGE * 100)); ui->sRGBCheckBox->setCheckState(Qt::Checked); - ui->nonDiffuseVPLBox->setCheckState(Qt::Unchecked); + ui->diffuseSourcesBox->setCheckState(Qt::Checked); + ui->diffuseReceiversBox->setCheckState(Qt::Unchecked); } void PreviewSettingsDialog::on_keySlider_valueChanged(int value) { @@ -139,8 +142,17 @@ void PreviewSettingsDialog::on_sRGBCheckBox_stateChanged(int state) { emit gammaChanged(state == Qt::Checked, (Float) ui->gammaSpinBox->value()); } -void PreviewSettingsDialog::on_nonDiffuseVPLBox_stateChanged(int state) { - emit allowNonDiffuseVPLsChanged(state == Qt::Checked); +void PreviewSettingsDialog::on_diffuseReceiversBox_stateChanged(int state) { + emit diffuseReceiversChanged(state == Qt::Checked); +} + +void PreviewSettingsDialog::on_diffuseSourcesBox_stateChanged(int state) { + emit diffuseSourcesChanged(state == Qt::Checked); + if (state == Qt::Unchecked && ui->diffuseReceiversBox->isChecked()) { + emit diffuseReceiversChanged(Qt::Unchecked); + ui->diffuseReceiversBox->setCheckState(Qt::Unchecked); + } + ui->diffuseReceiversBox->setEnabled(state == Qt::Checked); } void PreviewSettingsDialog::on_previewMethodCombo_activated(int index) { diff --git a/src/qtgui/previewsettingsdlg.h b/src/qtgui/previewsettingsdlg.h index 405a876e..ca9d490b 100644 --- a/src/qtgui/previewsettingsdlg.h +++ b/src/qtgui/previewsettingsdlg.h @@ -26,7 +26,8 @@ signals: void toneMappingMethodChanged(EToneMappingMethod method); void reinhardKeyChanged(Float key); void reinhardBurnChanged(Float burn); - void allowNonDiffuseVPLsChanged(bool); + void diffuseReceiversChanged(bool); + void diffuseSourcesChanged(bool); protected slots: void on_pathLengthSlider_valueChanged(int value); @@ -36,7 +37,8 @@ protected slots: void on_exposureSpinBox_valueChanged(double value); void on_gammaSpinBox_valueChanged(double value); void on_sRGBCheckBox_stateChanged(int state); - void on_nonDiffuseVPLBox_stateChanged(int state); + void on_diffuseReceiversBox_stateChanged(int state); + void on_diffuseSourcesBox_stateChanged(int state); void on_resetButton_clicked(); void on_previewMethodCombo_activated(int index); void on_toneMappingMethodCombo_activated(int index); diff --git a/src/qtgui/previewsettingsdlg.ui b/src/qtgui/previewsettingsdlg.ui index b3365490..4bc4de3e 100644 --- a/src/qtgui/previewsettingsdlg.ui +++ b/src/qtgui/previewsettingsdlg.ui @@ -6,8 +6,8 @@ 0 0 - 414 - 382 + 428 + 379 @@ -239,6 +239,27 @@ p, li { white-space: pre-wrap; } + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When a scene contains many glossy surfaces, the real-time visualization can sometimes produce disturbing image artifacts (bright blotches).<span style=" font-weight:600;"> </span>These eventually disappear as the preview converges, but waiting for a long time may be undesirable. The following options are meant to reduce such issues:</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Diffuse sources</span>: treat glossy surfaces at the second bounce as if they were diffuse. This is usually perfectly fine for previewing purposes and is thus turned on by default.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Diffuse receivers</span>: treat directly visible surfaces as if they were diffuse. This is leads to a much more approximate result -- essentially, a clay version of the scene is being rendered.</p></body></html> + + + &Force diffuse : + + + diffuseSourcesBox + + + @@ -298,6 +319,33 @@ p, li { white-space: pre-wrap; } + + + + Key value : + + + + + + + 100 + + + Qt::Horizontal + + + + + + + E&xposure : 2 ^ + + + exposureSpinBox + + + @@ -386,6 +434,16 @@ p, li { white-space: pre-wrap; } + + + + &Gamma : + + + gammaSpinBox + + + @@ -466,77 +524,51 @@ p, li { white-space: pre-wrap; } - - - - Key value : - - - - - - - 100 - - - Qt::Horizontal - - - - - - - E&xposure : 2 ^ - - - exposureSpinBox - - - - - - - &Gamma : - - - gammaSpinBox - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + + + 0 + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When a scene contains many glossy surfaces, the real-time visualization can sometimes produce disturbing image artifacts (bright blotches).<span style=" font-weight:600;"> </span>These eventually disappear as the preview converges, but waiting for a long time may be undesirable.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When a scene contains many glossy surfaces, the real-time visualization can sometimes produce disturbing image artifacts (bright blotches).<span style=" font-weight:600;"> </span>These eventually disappear as the preview converges, but waiting for a long time may be undesirable. The following options are meant to reduce such issues:</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For this reason, the real-time visualiztaion will by default treat glossy surfaces at the second bounce as if they were diffuse, which is usually perfectly fine for previewing purposes. This behavior can optionally be disabled using this switch.</p></body></html> - - - Allow non-diffuse point sources - - - - - - - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Diffuse sources</span>: treat glossy surfaces at the second bounce as if they were diffuse. This is usually perfectly fine for previewing purposes and is thus turned on by default.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Diffuse receivers</span>: treat directly visible surfaces as if they were diffuse. This is leads to a much more approximate result -- essentially, a clay version of the scene is being rendered.</p></body></html> + + + Sources + + + + + + + true + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When a scene contains many glossy surfaces, the real-time visualization can sometimes produce disturbing image artifacts (bright blotches).<span style=" font-weight:600;"> </span>These eventually disappear as the preview converges, but waiting for a long time may be undesirable.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">When a scene contains many glossy surfaces, the real-time visualization can sometimes produce disturbing image artifacts (bright blotches).<span style=" font-weight:600;"> </span>These eventually disappear as the preview converges, but waiting for a long time may be undesirable. The following options are meant to reduce such issues:</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">For this reason, the real-time visualiztaion will by default treat glossy surfaces at the second bounce as if they were diffuse, which is usually perfectly fine for previewing purposes. This behavior can optionally be disabled using this switch.</p></body></html> - - - &Other : - - - nonDiffuseVPLBox - - +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Diffuse sources</span>: treat glossy surfaces at the second bounce as if they were diffuse. This is usually perfectly fine for previewing purposes and is thus turned on by default.</p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Diffuse receivers</span>: treat directly visible surfaces as if they were diffuse. This is leads to a much more approximate result -- essentially, a clay version of the scene is being rendered.</p></body></html> + + + Receivers + + + + @@ -546,7 +578,8 @@ p, li { white-space: pre-wrap; } pathLengthEdit clampingSlider shadowResolutionCombo - nonDiffuseVPLBox + diffuseSourcesBox + diffuseReceiversBox toneMappingMethodCombo keySlider exposureSpinBox @@ -565,8 +598,8 @@ p, li { white-space: pre-wrap; } accept() - 403 - 371 + 417 + 368 167 diff --git a/src/qtgui/sceneloader.cpp b/src/qtgui/sceneloader.cpp index e82b44dd..12e78eca 100644 --- a/src/qtgui/sceneloader.cpp +++ b/src/qtgui/sceneloader.cpp @@ -31,7 +31,8 @@ void SceneLoader::run() { m_result->clamping = (Float) settings.value("preview_clamping", 0.1f).toDouble(); m_result->previewMethod = (EPreviewMethod) settings.value("preview_previewMethod", EOpenGL).toInt(); m_result->toneMappingMethod = (EToneMappingMethod) settings.value("preview_toneMappingMethod", EGamma).toInt(); - m_result->allowNonDiffuseVPLs = settings.value("preview_allowNonDiffuseVPLs", false).toBool(); + m_result->diffuseSources = settings.value("preview_diffuseSources", true).toBool(); + m_result->diffuseReceivers = settings.value("preview_diffuseReceivers", false).toBool(); if (endsWith(lowerCase, ".exr")) { /* This is an image, not a scene */