Fix: Vector Blur slightly differs between CPU and GPU

The Vector Blur implementation slightly differs between CPU and GPU due
to different precision in the sqrt2 constant, so use the float variant
in CPU to make it closer to GPU.
This commit is contained in:
Omar Emara
2024-04-05 10:25:27 +02:00
parent f6bff96ac5
commit 0dc98f784c

View File

@@ -145,7 +145,7 @@ bool is_inside_motion_line(int2 tile, MotionLine motion_line)
float distance_to_line = math::dot(motion_line.normal, motion_line.origin - float2(tile));
/* In order to be conservative and for simplicity, we use the tiles bounding circles.
* Consider that both the tile and the line have bounding radius of M_SQRT1_2. */
return math::abs(distance_to_line) < math::numbers::sqrt2;
return math::abs(distance_to_line) < math::numbers::sqrt2_v<float>;
}
/* The max tile velocity image computes the maximum within 32x32 blocks, while the velocity can