Skip to content

Commit 4ca8c5e

Browse files
committedJan 30, 2025·
Add comment about RoughnessToAlpha bug.
Issue #479.
1 parent 6a43ed9 commit 4ca8c5e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/pbrt/util/scattering.h

+5
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ class TrowbridgeReitzDistribution {
188188

189189
std::string ToString() const;
190190

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

0 commit comments

Comments
 (0)
Please sign in to comment.