Other than that; where there is one, there are many. First do all positions, then all intersections, then all indicators etc. for cache coherency.
Other than that; where there is one, there are many. First do all positions, then all intersections, then all indicators etc. for cache coherency.
# precompute these
wr = 0.5 / _viewport_size.x
hr = 0.5 / _viewport_size.y
# assuming direction is from the center of screen
v = normalize(_current_target_direction)
_current_intersection_point = minf(absf(wr * v.x), absf(hr * v.y)) * v
# precompute these
wr = 0.5 / _viewport_size.x
hr = 0.5 / _viewport_size.y
# assuming direction is from the center of screen
v = normalize(_current_target_direction)
_current_intersection_point = minf(absf(wr * v.x), absf(hr * v.y)) * v