Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-01-20 01:00:34 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-01-20 01:03:45 +0300
commita1f4821b94b09572d1606e4268b88e62bd5dd1e7 (patch)
treebe6a2fefd9eaa2bd85446dd7eed5c08e924e2179 /intern/cycles/kernel/closure/bsdf_reflection.h
parent4a4297ba02a8e308ef0fad4dc7a2966143360481 (diff)
Fix T42212: Singular reflection pass is incorrect in regular path tracer
Issue seems to be caused by not totally proper pdf and eval values for this closure. Changed it so they reflect to ggx/beckmann reflection with roughness set to 0, which is effectively the same as the sharp reflection.
Diffstat (limited to 'intern/cycles/kernel/closure/bsdf_reflection.h')
-rw-r--r--intern/cycles/kernel/closure/bsdf_reflection.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_reflection.h b/intern/cycles/kernel/closure/bsdf_reflection.h
index 0baccdf155c..6b90236525d 100644
--- a/intern/cycles/kernel/closure/bsdf_reflection.h
+++ b/intern/cycles/kernel/closure/bsdf_reflection.h
@@ -70,8 +70,9 @@ ccl_device int bsdf_reflection_sample(const ShaderClosure *sc, float3 Ng, float3
*domega_in_dx = 2 * dot(N, dIdx) * N - dIdx;
*domega_in_dy = 2 * dot(N, dIdy) * N - dIdy;
#endif
- *pdf = 1;
- *eval = make_float3(1, 1, 1);
+ /* Some high number for MIS. */
+ *pdf = 1e6f;
+ *eval = make_float3(1e6f, 1e6f, 1e6f);
}
}
return LABEL_REFLECT|LABEL_SINGULAR;