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.
This commit is contained in:
Sergey Sharybin 2015-01-30 14:00:24 +05:00
parent bd10b72ad3
commit a3c13fa9e8

@ -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;
}