...
 
Commits (2)
    https://gitcode.net/imjiangjun/pbrt-v4/-/commit/73ad6bc42044531780e02298ba4cfe8303b0dc15 Fix fatal error on Hair material 2023-06-05T00:27:14+02:00 pbrt4bounty 73945652+pbrt4bounty@users.noreply.github.com This change fix a error on Hair material when the upper value for 'beta_m' or 'beta_n' is greatest than 1.0 https://gitcode.net/imjiangjun/pbrt-v4/-/commit/f6dc67fb3280ff1e597dcf690aced32d0a0567e0 Merge pull request #350 from pbrt4bounty/patch-4 2023-06-09T16:59:12-07:00 Matt Pharr matt@pharr.org Fix fatal error on Hair material
...@@ -379,8 +379,8 @@ class HairMaterial { ...@@ -379,8 +379,8 @@ class HairMaterial {
template <typename TextureEvaluator> template <typename TextureEvaluator>
PBRT_CPU_GPU HairBxDF GetBxDF(TextureEvaluator texEval, MaterialEvalContext ctx, PBRT_CPU_GPU HairBxDF GetBxDF(TextureEvaluator texEval, MaterialEvalContext ctx,
SampledWavelengths &lambda) const { SampledWavelengths &lambda) const {
Float bm = std::max<Float>(1e-2, texEval(beta_m, ctx)); Float bm = std::max<Float>(1e-2, std::min<Float>(1.0, texEval(beta_m, ctx)));
Float bn = std::max<Float>(1e-2, texEval(beta_n, ctx)); Float bn = std::max<Float>(1e-2, std::min<Float>(1.0, texEval(beta_n, ctx)));
Float a = texEval(alpha, ctx); Float a = texEval(alpha, ctx);
Float e = texEval(eta, ctx); Float e = texEval(eta, ctx);
......