Skip to content

Commit

Permalink
Add comment about RoughnessToAlpha bug.
Browse files Browse the repository at this point in the history
Issue #479.
  • Loading branch information
mmp committed Jan 30, 2025
1 parent 6a43ed9 commit 4ca8c5e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pbrt/util/scattering.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ class TrowbridgeReitzDistribution {

std::string ToString() const;

// Note that this should probably instead be "return Sqr(roughness)" to
// be more perceptually uniform, though this wasn't noticed until some
// time after pbrt-v4 shipped: https://github.com/mmp/pbrt-v4/issues/479.
// therefore, we will leave it as is so that the rendered results with
// existing pbrt-v4 scenes doesn't change unexpectedly.
PBRT_CPU_GPU
static Float RoughnessToAlpha(Float roughness) { return std::sqrt(roughness); }

Expand Down

0 comments on commit 4ca8c5e

Please sign in to comment.