3 ms·
That's assuming you have raycasting rendering(most game engines don't) and/or hoping that the way you draw your ray cast scene matches up pixel perfect with the
by vvanders 8y ago
That's assuming you have raycasting rendering(most game engines don't) and/or hoping that the way you draw your ray cast scene matches up pixel perfect with the GPU(it won't).
Generally rendering Geo + Fill is cheap, it's the complex shaders and post that tend to drag down your GPU. Heck, if you're doing GPU occlusion culling you're basically doing the same idea but for rendering whole objects.
You can also do this every 1/10 frames or so to keep overhead low. UE3 and a bunch of game editors use this technique pretty extensively.
- AHTERIX5000 8y agoMost game engines do have acceleration structure that can be used for raycasts such as one provided by physics system though. Of course it is not 1:1 compared to rendering but coarse bboxes are in many cases more useful than really accurate methods. And you can avoid syncing.