Skip to content

Commit

Permalink
Merge pull request #1776 from dictoon/master
Browse files Browse the repository at this point in the history
Fix rare regression in specular BTDF
  • Loading branch information
dictoon authored Dec 21, 2017
2 parents 0febbf1 + 9e2f932 commit 3d763c6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
Binary file modified sandbox/tests/test scenes/bsdf/metalbrdf/ref/01 - metalbrdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/appleseed/renderer/modeling/bsdf/specularbtdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ namespace
}
}

if (!cosine_mult)
{
const float cos_in = abs(dot(incoming, shading_normal));
sample.m_value.m_glossy /= cos_in;
}

sample.m_value.m_beauty = sample.m_value.m_glossy;

// The probability density of the sampled direction is the Dirac delta.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,7 @@ bool ProjectFileWriter::write_packed_project_file(
{
RENDERER_LOG_INFO("packing project to %s...", filepath);
zip(filepath, temp_directory.string());
RENDERER_LOG_INFO("packed project to %s...", filepath);
}
}
catch (const std::exception&)
Expand Down

0 comments on commit 3d763c6

Please sign in to comment.