Fix rotation axis not normalized in light tree #OrientationBounds

This commit is contained in:
Weizhen Huang
2023-03-23 11:11:54 +01:00
parent 84e170c563
commit 791f35e2c0

View File

@@ -57,7 +57,7 @@ OrientationBounds merge(const OrientationBounds &cone_a, const OrientationBounds
/* Rotate new axis to be between a and b. */
float theta_r = theta_o - a->theta_o;
float3 new_axis = rotate_around_axis(a->axis, cross(a->axis, b->axis), theta_r);
float3 new_axis = rotate_around_axis(a->axis, normalize(cross(a->axis, b->axis)), theta_r);
new_axis = normalize(new_axis);
return OrientationBounds({new_axis, theta_o, theta_e});