Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
shihab
45 days ago
|
parent
|
context
|
favorite
| on:
A Couple 3D AABB Tricks
For SIMD at least, the {mins[3], maxs[3]} representation aligns more naturally with actual instructions on x86. To compute a new bounding box:
new_box.mins = _mm_min_ps(a.mins[3], b.mins[3]);
astrange
45 days ago
|
next
[–]
You would want [4] not [3], with the last one being padding. Of course, you can't always afford that.
delta_p_delta_x
45 days ago
|
prev
[–]
Indeed. This is classic array-of-structs versus struct-of-arrays.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
new_box.mins = _mm_min_ps(a.mins[3], b.mins[3]);