未验证 提交 94cd09cb 编写于 作者: M Matt Pharr 提交者: GitHub

Update materials.cpp

Moved the divides to also cover the case where it works backward
to compute eta/k based on a user-specified reflectance.
上级 e86038eb
......@@ -364,14 +364,16 @@ CoatedConductorBxDF CoatedConductorMaterial::GetBxDF(TextureEvaluator texEval,
SampledSpectrum ce, ck;
if (conductorEta) {
ce = texEval(conductorEta, ctx, lambda) / ieta;
ck = texEval(k, ctx, lambda) / ieta;
ce = texEval(conductorEta, ctx, lambda);
ck = texEval(k, ctx, lambda);
} else {
// Avoid r==0 NaN case...
SampledSpectrum r = Clamp(texEval(reflectance, ctx, lambda), 0, .9999);
ce = SampledSpectrum(1.f);
ck = 2 * Sqrt(r) / Sqrt(ClampZero(SampledSpectrum(1) - r));
}
ce /= ieta;
ck /= ieta;
Float curough = texEval(conductorURoughness, ctx);
Float cvrough = texEval(conductorVRoughness, ctx);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册