attempt to fix a photon mapper crash
parent
e2efbfcfe3
commit
03632fa11c
|
@ -87,7 +87,8 @@ MTS_NAMESPACE_BEGIN
|
||||||
*/
|
*/
|
||||||
class PhotonMapIntegrator : public SamplingIntegrator {
|
class PhotonMapIntegrator : public SamplingIntegrator {
|
||||||
public:
|
public:
|
||||||
PhotonMapIntegrator(const Properties &props) : SamplingIntegrator(props) {
|
PhotonMapIntegrator(const Properties &props) : SamplingIntegrator(props),
|
||||||
|
m_parentIntegrator(NULL) {
|
||||||
/* Number of lsamples for direct illumination */
|
/* Number of lsamples for direct illumination */
|
||||||
m_directSamples = props.getInteger("directSamples", 16);
|
m_directSamples = props.getInteger("directSamples", 16);
|
||||||
/* Number of BSDF samples when intersecting a glossy material */
|
/* Number of BSDF samples when intersecting a glossy material */
|
||||||
|
@ -150,7 +151,7 @@ public:
|
||||||
|
|
||||||
/// Unserialize from a binary data stream
|
/// Unserialize from a binary data stream
|
||||||
PhotonMapIntegrator(Stream *stream, InstanceManager *manager)
|
PhotonMapIntegrator(Stream *stream, InstanceManager *manager)
|
||||||
: SamplingIntegrator(stream, manager) {
|
: SamplingIntegrator(stream, manager), m_parentIntegrator(NULL) {
|
||||||
m_directSamples = stream->readInt();
|
m_directSamples = stream->readInt();
|
||||||
m_glossySamples = stream->readInt();
|
m_glossySamples = stream->readInt();
|
||||||
m_maxDepth = stream->readInt();
|
m_maxDepth = stream->readInt();
|
||||||
|
|
|
@ -55,6 +55,7 @@ public:
|
||||||
m_sampler = static_cast<Sampler *>(getResource("sampler"));
|
m_sampler = static_cast<Sampler *>(getResource("sampler"));
|
||||||
m_integrator = static_cast<SamplingIntegrator *>(getResource("integrator"));
|
m_integrator = static_cast<SamplingIntegrator *>(getResource("integrator"));
|
||||||
m_scene->wakeup(NULL, m_resources);
|
m_scene->wakeup(NULL, m_resources);
|
||||||
|
m_integrator->wakeup(NULL, m_resources);
|
||||||
}
|
}
|
||||||
|
|
||||||
void process(const WorkUnit *workUnit, WorkResult *workResult,
|
void process(const WorkUnit *workUnit, WorkResult *workResult,
|
||||||
|
|
Loading…
Reference in New Issue