Dennis van den Broek @pointerfunction.bsky.social · Aug 25

I have spent the last few days optimizing my raycast queries. I am using a ‘BVH’, which is pretty much a fancy subdivided octree holding references to subsets of triangles of a bigger mesh. Generated at loadtime:

5 likes 1 replies

?

Replies

Dennis van den Broek · Aug 25

Then I only have to query the ray against a few boxes (drawn in red if hit), and I only need to test like 10-15 triangles instead of 1200 at that point! Performance has greatly increased on this (and I fixed some division by zero issues too!). Next up; animations!