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-30 12:00:24 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-01-30 12:00:24 +0300
commita3c13fa9e80fdb0334c9fb0fb8ba771c9862ebb9 (patch)
tree24efde17e63d31e3361e502f1bf0372453532cf2 /intern/cycles/kernel/closure
parentbd10b72ad38eea117ee440567c1e2edb04970f36 (diff)
Cycles: Remove confusing labels usage in hair BSDF
BSDF sampler function shouldn't give labels it's not intended to do. That said reflection shouldn't give transmission ray and transmission give reflection ray. Added an assert in the transmission sampling but reflection still needs some investigation because even after recent fixes the check for projection onto the reflected ray could give both positive and negative values. It shouldn't have any affect on renders just makes internal logic consistent and unleashes an issue to be investigate further.
Diffstat (limited to 'intern/cycles/kernel/closure')
-rw-r--r--intern/cycles/kernel/closure/bsdf_hair.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/intern/cycles/kernel/closure/bsdf_hair.h b/intern/cycles/kernel/closure/bsdf_hair.h
index 4f4fd5d26b8..3d7bdab4ff2 100644
--- a/intern/cycles/kernel/closure/bsdf_hair.h
+++ b/intern/cycles/kernel/closure/bsdf_hair.h
@@ -211,10 +211,6 @@ ccl_device int bsdf_hair_reflection_sample(const ShaderClosure *sc, float3 Ng, f
*eval = make_float3(*pdf, *pdf, *pdf);
- if(dot(locy, *omega_in) < 0.0f) {
- return LABEL_REFLECT|LABEL_TRANSMIT|LABEL_GLOSSY;
- }
-
return LABEL_REFLECT|LABEL_GLOSSY;
}
@@ -267,9 +263,8 @@ ccl_device int bsdf_hair_transmission_sample(const ShaderClosure *sc, float3 Ng,
*eval = make_float3(*pdf, *pdf, *pdf);
- if(dot(locy, *omega_in) < 0.0f)
- return LABEL_TRANSMIT|LABEL_GLOSSY;
-
+ kernel_assert(dot(locy, *omega_in) < 0.0f);
+
return LABEL_GLOSSY;
}