-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New sunsky
emitter plugin
#1491
base: master
Are you sure you want to change the base?
Conversation
Also modify resource path to match that
Also fix gather with index out of bounds
Due to the new `ContinuousDistribution` being built with empty pdf.
spectral or RGB mode, if the final output is an sRGB image, it can happen that | ||
it contains negative pixel values or be over-saturated. These results are left | ||
un-clamped to let the user post-process the image to their liking, without | ||
loosing information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loosing information. | |
losing information. |
FloatStorage params = dr::gather<FloatStorage>(tgmm_tables, indices[mixture_idx] + param_indices); | ||
|
||
// Apply lerp factor to gaussian weights | ||
//dr::scatter_reduce(ReduceOp::Mul, params, (FloatStorage)lerp_factors[mixture_idx], gaussian_weight_idx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this commented out code be removed?
callback->put_parameter("to_world", *m_to_world.ptr(), +ParamFlags::NonDifferentiable); | ||
} | ||
|
||
void parameters_changed(const std::vector<std::string> & /*unused*/) override { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be filtering on what to update based on the keys passed? e.g. I don't think all updates necessarily require us to update the TGMM?
template <typename Value> | ||
MI_INLINE Point<Value, 2> from_spherical(const Vector<Value, 3> &v) { | ||
return { dr::atan2(v.y(), v.x()), dr::unit_angle_z(v) }; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I keep re-implementing this function. Would it make sense to move it to math.h
instead and expose it with Python bindings?
This PR supersedes #1473. Its content is very similar to the original PR, but has a refactoring/formatting passes.
The dataset generation code (originally commented code in #1473) was refactored, packaged and moved to the
resources/data
submodule.resources/data
submodule` must be updated accordinglyAgain, credits to @matttsss for this excellent work.