Skip to content

Commit

Permalink
Fix for sampling_weight emitter attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiPhil authored and njroussel committed May 29, 2024
1 parent 3160a31 commit d9751f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/render/emitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ NAMESPACE_BEGIN(mitsuba)
MI_VARIANT Emitter<Float, Spectrum>::Emitter(const Properties &props)
: Base(props) {
m_sampling_weight = props.get<ScalarFloat>("sampling_weight", 1.0f);
dr::set_attr(this, "sampling_weight", m_sampling_weight);
}
MI_VARIANT Emitter<Float, Spectrum>::~Emitter() { }

Expand All @@ -20,6 +21,7 @@ MI_VARIANT
void Emitter<Float, Spectrum>::parameters_changed(const std::vector<std::string> &keys) {
set_dirty(true);
Base::parameters_changed(keys);
dr::set_attr(this, "sampling_weight", m_sampling_weight);
}

MI_IMPLEMENT_CLASS_VARIANT(Emitter, Endpoint, "emitter")
Expand Down

0 comments on commit d9751f6

Please sign in to comment.