forked from bartvdbraak/blender
Cycles: Make SSS intersection closer to regular triangle intersection
This commit is contained in:
parent
394b947a50
commit
f1494edf78
@ -247,13 +247,10 @@ ccl_device_inline void triangle_intersect_subsurface(
|
||||
/* Calculate scaled z−coordinates of vertices and use them to calculate
|
||||
* the hit distance.
|
||||
*/
|
||||
const float Az = Sz * A_kz;
|
||||
const float Bz = Sz * B_kz;
|
||||
const float Cz = Sz * C_kz;
|
||||
const float T = U * Az + V * Bz + W * Cz;
|
||||
|
||||
if((xor_signmast(T, sign_mask) < 0.0f) ||
|
||||
(xor_signmast(T, sign_mask) > tmax * xor_signmast(det, sign_mask)))
|
||||
const float T = (U * A_kz + V * B_kz + W * C_kz) * Sz;
|
||||
const float sign_T = xor_signmast(T, sign_mask);
|
||||
if((sign_T < 0.0f) ||
|
||||
(sign_T > tmax * xor_signmast(det, sign_mask)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user