Skip to content

Commit

Permalink
Fix more assertions with foundation::improve_normalization()
Browse files Browse the repository at this point in the history
  • Loading branch information
dictoon committed Jan 27, 2016
1 parent 5ce191f commit 5ab7ff7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/appleseed/renderer/modeling/bsdf/specularbtdf.cpp
Expand Up @@ -145,7 +145,6 @@ namespace
cos_theta_i > 0.0
? (eta * cos_theta_i - cos_theta_t) * shading_normal - eta * sample.m_outgoing.get_value()
: (eta * cos_theta_i + cos_theta_t) * shading_normal - eta * sample.m_outgoing.get_value();
incoming = improve_normalization(incoming);

// Compute the refracted radiance.
sample.m_value = values->m_transmittance;
Expand All @@ -165,6 +164,8 @@ namespace
// Set the scattering mode.
sample.m_mode = ScatteringMode::Specular;

// Set the incoming direction.
incoming = improve_normalization(incoming);
sample.m_incoming = Dual3d(incoming);

if (refract_differentials)
Expand Down

0 comments on commit 5ab7ff7

Please sign in to comment.