Fix cycles hair curves with NaN values not rendering with dynamic BVH. These NaN
values were breaking the bounding box computation, now they should have no influence.
This commit is contained in:
@@ -61,15 +61,17 @@ public:
|
|||||||
|
|
||||||
__forceinline void grow(const float3& pt)
|
__forceinline void grow(const float3& pt)
|
||||||
{
|
{
|
||||||
min = ccl::min(min, pt);
|
/* the order of arguments to min is such that if pt is nan, it will not
|
||||||
max = ccl::max(max, pt);
|
* influence the resulting bounding box */
|
||||||
|
min = ccl::min(pt, min);
|
||||||
|
max = ccl::max(pt, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline void grow(const float3& pt, float border)
|
__forceinline void grow(const float3& pt, float border)
|
||||||
{
|
{
|
||||||
float3 shift = {border, border, border, 0.0f};
|
float3 shift = {border, border, border, 0.0f};
|
||||||
min = ccl::min(min, pt - shift);
|
min = ccl::min(pt - shift, min);
|
||||||
max = ccl::max(max, pt + shift);
|
max = ccl::max(pt + shift, max);
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline void grow(const BoundBox& bbox)
|
__forceinline void grow(const BoundBox& bbox)
|
||||||
|
Reference in New Issue
Block a user